diff options
Diffstat (limited to 'libglusterfs/src/syncop.h')
-rw-r--r-- | libglusterfs/src/syncop.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libglusterfs/src/syncop.h b/libglusterfs/src/syncop.h index 6e900e8d0..37e2b0e28 100644 --- a/libglusterfs/src/syncop.h +++ b/libglusterfs/src/syncop.h @@ -59,6 +59,9 @@ struct synctask { int slept; int ret; + uid_t uid; + gid_t gid; + ucontext_t ctx; struct syncproc *proc; @@ -169,6 +172,10 @@ struct syncargs { frame = task->opframe; \ else \ frame = create_frame (THIS, THIS->ctx->pool); \ + if (task) { \ + frame->root->uid = task->uid; \ + frame->root->gid = task->gid; \ + } \ \ __yawn (stb); \ \ @@ -195,6 +202,9 @@ int synctask_new (struct syncenv *, synctask_fn_t, synctask_cbk_t, call_frame_t* void synctask_wake (struct synctask *task); void synctask_yield (struct synctask *task); +int synctask_setid (struct synctask *task, uid_t uid, gid_t gid); +#define SYNCTASK_SETID(uid, gid) synctask_setid (synctask_get(), uid, gid); + int syncop_lookup (xlator_t *subvol, loc_t *loc, dict_t *xattr_req, /* out */ struct iatt *iatt, dict_t **xattr_rsp, struct iatt *parent); |