diff options
-rw-r--r-- | libglusterfs/src/syncop.c | 20 | ||||
-rw-r--r-- | libglusterfs/src/syncop.h | 3 |
2 files changed, 23 insertions, 0 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index 01ca9153733..ccb4444e610 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -2858,3 +2858,23 @@ syncop_xattrop (xlator_t *subvol, loc_t *loc, gf_xattrop_flags_t flags, return args.op_ret; } + +int +syncop_fxattrop (xlator_t *subvol, fd_t *fd, gf_xattrop_flags_t flags, + dict_t *dict, dict_t *xdata_in, dict_t **xdata_out) +{ + struct syncargs args = {0, }; + + SYNCOP (subvol, (&args), syncop_xattrop_cbk, subvol->fops->fxattrop, + fd, flags, dict, xdata_in); + + if (xdata_out) + *xdata_out = args.xdata; + else if (args.xdata) + dict_unref (args.xdata); + + if (args.op_ret < 0) + return -args.op_errno; + + return args.op_ret; +} diff --git a/libglusterfs/src/syncop.h b/libglusterfs/src/syncop.h index e9d3428c512..3a7798fa17e 100644 --- a/libglusterfs/src/syncop.h +++ b/libglusterfs/src/syncop.h @@ -495,4 +495,7 @@ int syncop_ipc (xlator_t *subvol, int op, dict_t *xdata_in, dict_t **xdata_out); int syncop_xattrop (xlator_t *subvol, loc_t *loc, gf_xattrop_flags_t flags, dict_t *dict, dict_t *xdata_in, dict_t **xdata_out); +int +syncop_fxattrop (xlator_t *subvol, fd_t *fd, gf_xattrop_flags_t flags, + dict_t *dict, dict_t *xdata_in, dict_t **xdata_out); #endif /* _SYNCOP_H */ |