|
|
cb8e9e |
From 636bc6d1e558b2da71a0013c423c043025703ecf Mon Sep 17 00:00:00 2001
|
|
|
cb8e9e |
From: Vijay Bellur <vbellur@redhat.com>
|
|
|
cb8e9e |
Date: Mon, 22 Jun 2015 19:01:39 -0400
|
|
|
cb8e9e |
Subject: [PATCH 170/190] features/changelog: Always log directory rename operations
|
|
|
cb8e9e |
|
|
|
cb8e9e |
Directory renames are being ignored as special renames. special
|
|
|
cb8e9e |
renames can happen only on files. Hence always log directory
|
|
|
cb8e9e |
rename operations in changelog.
|
|
|
cb8e9e |
|
|
|
cb8e9e |
Change-Id: I4fbdb3e02e634a39a8846fb2f7a4c6cc2ba74400
|
|
|
cb8e9e |
BUG: 1235236
|
|
|
cb8e9e |
Reviewed-On: http://review.gluster.org/11356
|
|
|
cb8e9e |
Reviewed-On: http://review.gluster.org/11378
|
|
|
cb8e9e |
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|
|
cb8e9e |
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
|
|
|
cb8e9e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/51496
|
|
|
cb8e9e |
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
|
|
|
cb8e9e |
Reviewed-by: Venky Shankar <vshankar@redhat.com>
|
|
|
cb8e9e |
Tested-by: Venky Shankar <vshankar@redhat.com>
|
|
|
cb8e9e |
---
|
|
|
cb8e9e |
xlators/features/changelog/src/changelog.c | 4 +++-
|
|
|
cb8e9e |
1 files changed, 3 insertions(+), 1 deletions(-)
|
|
|
cb8e9e |
|
|
|
cb8e9e |
diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c
|
|
|
cb8e9e |
index 47696f4..428ed1d 100644
|
|
|
cb8e9e |
--- a/xlators/features/changelog/src/changelog.c
|
|
|
cb8e9e |
+++ b/xlators/features/changelog/src/changelog.c
|
|
|
cb8e9e |
@@ -381,7 +381,9 @@ changelog_rename (call_frame_t *frame, xlator_t *this,
|
|
|
cb8e9e |
CHANGELOG_NOT_ACTIVE_THEN_GOTO (frame, priv, wind);
|
|
|
cb8e9e |
|
|
|
cb8e9e |
ret = dict_get_bin (xdata, DHT_CHANGELOG_RENAME_OP_KEY, (void **)&info;;
|
|
|
cb8e9e |
- if (ret) { /* xdata "NOT" set, Special rename => avoid logging */
|
|
|
cb8e9e |
+ if (ret && oldloc->inode->ia_type != IA_IFDIR) {
|
|
|
cb8e9e |
+ /* xdata "NOT" set for a non-directory,
|
|
|
cb8e9e |
+ * Special rename => avoid logging */
|
|
|
cb8e9e |
goto wind;
|
|
|
cb8e9e |
}
|
|
|
cb8e9e |
|
|
|
cb8e9e |
--
|
|
|
cb8e9e |
1.7.1
|
|
|
cb8e9e |
|