summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-04-26 10:40:18 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-06 02:22:11 -0700
commit6562656f69dae5a7c9251ae86e12a1a45dbfd7f9 (patch)
tree29e4b2f2b8623aaa4c4143090dd2194501b357a7 /libglusterfs
parent0dea37dd6da379d9c11e6291d187194399b36485 (diff)
syncop: Implement syncop_fxattrop
Backport of http://review.gluster.org/10382 BUG: 1216303 Change-Id: I4433002906efc6894b4ff8de8fefe8b7bc954dcf Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/10438 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/syncop.c20
-rw-r--r--libglusterfs/src/syncop.h3
2 files changed, 23 insertions, 0 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index c930193cb3c..9224abaeeed 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -2936,3 +2936,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 4eebd56e5f8..f41706a9d37 100644
--- a/libglusterfs/src/syncop.h
+++ b/libglusterfs/src/syncop.h
@@ -509,4 +509,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 */