|
From: | fog - |
Subject: | Re: [Gluster-devel] rpc problems when using syncops in callbacks |
Date: | Mon, 29 Apr 2013 08:27:30 +0000 |
Hello Avati,
I am wrapping the syncop call in a synctask_new (otherwise glusterFS will run into a null pointer @ synctask_get in the SYNCOP macro & crash). Below is some code to show how I do it currently to test the syncops. typedef struct{ xlator_t *this; loc_t *loc; dict_t *dic; }syncstore_args; int32_t __xattr_store_sync(void* data) { syncstore_args *args = (syncstore_args*)data; return syncop_setxattr(FIRST_CHILD(args->this), args->loc, args->dic, 0); } int32_t xattr_store_sync(xlator_t *this, call_frame_t *frame, loc_t *loc, dict_t *dic) { syncstore_args args = {this, loc, dic}; return synctask_new(this->ctx->env, __xattr_store_sync, NULL, NULL, &args); } Date: Mon, 29 Apr 2013 00:19:11 -0700 Subject: Re: [Gluster-devel] rpc problems when using syncops in callbacks From: address@hidden To: address@hidden CC: address@hidden Note that you need to place your syncop code in a synctask function strictly within a syncenv (by calling synctask_new(). You're probably calling syncop_XXX() directly in your xlator code? Avati On Fri, Apr 26, 2013 at 2:40 AM, fog - <address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |