From 8305c0e52b0933d55bb08e3d0b42da8b39e9cab9 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Mon, 22 Jun 2015 19:01:39 -0400 Subject: 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 Reviewed-on: http://review.gluster.org/11378 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Kotresh HR --- xlators/features/changelog/src/changelog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit