summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/stub/bit-rot-stub.c
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-04-07 15:02:30 +0530
committerVenky Shankar <vshankar@redhat.com>2015-04-11 05:07:19 +0000
commitaf569aaf6ee69ed77be8afc82b4c496041a7bd1b (patch)
tree9470294569650f1c457b595240c55f2e6793ea8f /xlators/features/bit-rot/src/stub/bit-rot-stub.c
parent6eb27480b6559103e4437facd7aecbcd373479c9 (diff)
features/bit-rot: Mark versioning fsetxattr as internal fop
Changelog xlator was capturing bitrot-stub's fsetxattr sent for versioning. Since it was using the same frame as of the create fop, there was inconsistency in fop number and gfid of capturing metadata. So fix is to mark fsetxattr used for versioning as internal and add internal fop filter in changelog_fsetxattr. Change-Id: I51ff468995139838b22bf293a59a0713a92ee7a5 BUG: 1170075 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/10148 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/features/bit-rot/src/stub/bit-rot-stub.c')
-rw-r--r--xlators/features/bit-rot/src/stub/bit-rot-stub.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
index 0db5006..f9c3886 100644
--- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c
+++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
@@ -407,10 +407,15 @@ br_stub_fd_versioning (xlator_t *this, call_frame_t *frame,
dict_t *xdata = NULL;
br_stub_local_t *local = NULL;
+ xdata = dict_new ();
+ if (!xdata)
+ goto done;
+
+ ret = dict_set_int32 (xdata, GLUSTERFS_INTERNAL_FOP_KEY, 1);
+ if (ret)
+ goto dealloc_xdata;
+
if (durable) {
- xdata = dict_new ();
- if (!xdata)
- goto done;
ret = dict_set_int32 (xdata, GLUSTERFS_DURABLE_OP, 0);
if (ret)
goto dealloc_xdata;
@@ -437,8 +442,7 @@ br_stub_fd_versioning (xlator_t *this, call_frame_t *frame,
ret = 0;
dealloc_xdata:
- if (durable)
- dict_unref (xdata);
+ dict_unref (xdata);
done:
return ret;
}