summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--xlators/features/bit-rot/src/stub/bit-rot-stub.c14
-rw-r--r--xlators/features/changelog/src/changelog.c1
2 files changed, 10 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 0db500659b5..f9c3886948a 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;
}
diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c
index e6553c7f6bb..df8172765d7 100644
--- a/xlators/features/changelog/src/changelog.c
+++ b/xlators/features/changelog/src/changelog.c
@@ -1454,6 +1454,7 @@ changelog_fsetxattr (call_frame_t *frame,
priv = this->private;
CHANGELOG_NOT_ACTIVE_THEN_GOTO (frame, priv, wind);
+ CHANGELOG_IF_INTERNAL_FOP_THEN_GOTO (frame, xdata, wind);
CHANGELOG_OP_BOUNDARY_CHECK (frame, wind);