From aee44fccd450ac53421ebe729223ad1921e5f573 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: 1234286 Signed-off-by: Vijay Bellur Reviewed-on: http://review.gluster.org/11356 Tested-by: NetBSD Build System Reviewed-by: Venky Shankar --- xlators/features/changelog/src/changelog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/features') 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; } -- cgit