diff options
Diffstat (limited to 'libglusterfs/src/syncop.c')
-rw-r--r-- | libglusterfs/src/syncop.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index e3321cf6ddb..e241e2c1ee0 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -2537,3 +2537,39 @@ syncop_inodelk (xlator_t *subvol, const char *volume, loc_t *loc, int32_t cmd, return args.op_ret; } + +int32_t +syncop_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, dict_t *dict, + dict_t *xdata) +{ + struct syncargs *args = NULL; + + args = cookie; + + args->op_ret = op_ret; + args->op_errno = op_errno; + + if (xdata) + args->xdata = dict_ref (xdata); + + __wake (args); + + return 0; + +} + +int +syncop_xattrop (xlator_t *subvol, loc_t *loc, gf_xattrop_flags_t flags, + dict_t *dict, dict_t *xdata) +{ + struct syncargs args = {0, }; + + SYNCOP (subvol, (&args), syncop_xattrop_cbk, subvol->fops->xattrop, + loc, flags, dict, xdata); + + if (args.op_ret < 0) + return -args.op_errno; + + return args.op_ret; +} |