summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2015-06-22 19:01:39 -0400
committerVenky Shankar <vshankar@redhat.com>2015-06-26 05:25:52 -0700
commitaee44fccd450ac53421ebe729223ad1921e5f573 (patch)
tree73b8ee8138fe524ded82e5e7f387833e80e72664 /xlators/features/changelog
parentb15ba49546172786fb0416dd5a2802f638cacbb2 (diff)
features/changelog: Always log directory rename operations
Directory renames are being ignored as special renames. Special renames can happen only on files. Hence always log directory rename operations in changelog. Change-Id: I4fbdb3e02e634a39a8846fb2f7a4c6cc2ba74400 BUG: 1234286 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/11356 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/features/changelog')
-rw-r--r--xlators/features/changelog/src/changelog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c
index fd266b598a0..e88306b8f21 100644
--- a/xlators/features/changelog/src/changelog.c
+++ b/xlators/features/changelog/src/changelog.c
@@ -376,7 +376,9 @@ changelog_rename (call_frame_t *frame, xlator_t *this,
CHANGELOG_NOT_ACTIVE_THEN_GOTO (frame, priv, wind);
ret = dict_get_bin (xdata, DHT_CHANGELOG_RENAME_OP_KEY, (void **)&info);
- if (ret) { /* xdata "NOT" set, Special rename => avoid logging */
+ if (ret && oldloc->inode->ia_type != IA_IFDIR) {
+ /* xdata "NOT" set for a non-directory,
+ * Special rename => avoid logging */
goto wind;
}