summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2015-06-22 19:01:39 -0400
committerVijay Bellur <vbellur@redhat.com>2015-06-28 07:45:36 -0700
commit8305c0e52b0933d55bb08e3d0b42da8b39e9cab9 (patch)
tree36db7b2b2ac383bbba421cff4e63899879d4d3e4 /xlators/features/changelog
parent49c4b7f750e94aee22d892a7171ed2ad291559e3 (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: 1235242 Reviewed-On: http://review.gluster.org/11356 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/11378 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@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 47696f44678..428ed1d680b 100644
--- a/xlators/features/changelog/src/changelog.c
+++ b/xlators/features/changelog/src/changelog.c
@@ -381,7 +381,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;
}