diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2015-04-26 10:40:18 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-04-26 22:20:08 -0700 |
commit | 585b1f0d9e485674268cb90bd8f3fdb143bab06b (patch) | |
tree | 3b583b385cb93cd4864886231a19329e6f127661 /libglusterfs/src | |
parent | 540fc2829bd63a2fa070c68ed105eb23145df406 (diff) |
syncop: Implement syncop_fxattrop
Change-Id: Ifc7937ceb451f6e11e40a9513017226fd0f115b0
BUG: 1215265
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/10382
Tested-by: NetBSD Build System
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-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 */ |