From 636bc6d1e558b2da71a0013c423c043025703ecf Mon Sep 17 00:00:00 2001
From: Vijay Bellur <vbellur@redhat.com>
Date: Mon, 22 Jun 2015 19:01:39 -0400
Subject: [PATCH 170/190] 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: 1235236
Reviewed-On: http://review.gluster.org/11356
Reviewed-On: http://review.gluster.org/11378
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/51496
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
---
xlators/features/changelog/src/changelog.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c
index 47696f4..428ed1d 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;
}
--
1.7.1