|
|
7f4c2a |
From c005cdaf42edda9e515cd3a7657635a16a332987 Mon Sep 17 00:00:00 2001
|
|
|
7f4c2a |
From: Soumya Koduri <skoduri@redhat.com>
|
|
|
7f4c2a |
Date: Thu, 25 Jun 2015 00:47:19 +0530
|
|
|
7f4c2a |
Subject: [PATCH 179/190] Upcall: Fix an issue with invalidating parent entries
|
|
|
7f4c2a |
|
|
|
7f4c2a |
Any directory or file creation should result in cache-invalidation
|
|
|
7f4c2a |
requests sent to parent directory. However that is not the case
|
|
|
7f4c2a |
currently due to a bug while processing these requests in the
|
|
|
7f4c2a |
upcall xlator. We need to do invalidation checks on parent inode.
|
|
|
7f4c2a |
|
|
|
7f4c2a |
Fixed the same. Also fixed an issue with null client entries while
|
|
|
7f4c2a |
sending upcall notifications.
|
|
|
7f4c2a |
|
|
|
7f4c2a |
This is backport of the below upstream fix
|
|
|
7f4c2a |
http://review.gluster.org/11387
|
|
|
7f4c2a |
|
|
|
7f4c2a |
Change-Id: I3da7c79091291ba36fd8f8ebcfebcd77a192f250
|
|
|
7f4c2a |
BUG: 1235544
|
|
|
7f4c2a |
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
|
|
|
7f4c2a |
Reviewed-on: https://code.engineering.redhat.com/gerrit/51717
|
|
|
7f4c2a |
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
|
|
|
7f4c2a |
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
|
|
|
7f4c2a |
---
|
|
|
7f4c2a |
xlators/features/upcall/src/upcall.c | 16 ++++++++--------
|
|
|
7f4c2a |
1 files changed, 8 insertions(+), 8 deletions(-)
|
|
|
7f4c2a |
|
|
|
7f4c2a |
diff --git a/xlators/features/upcall/src/upcall.c b/xlators/features/upcall/src/upcall.c
|
|
|
7f4c2a |
index 331db52..ceeb99c 100644
|
|
|
7f4c2a |
--- a/xlators/features/upcall/src/upcall.c
|
|
|
7f4c2a |
+++ b/xlators/features/upcall/src/upcall.c
|
|
|
7f4c2a |
@@ -640,7 +640,7 @@ up_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
/* invalidate parent's entry too */
|
|
|
7f4c2a |
- flags = UP_PARENT_DENTRY_FLAGS;
|
|
|
7f4c2a |
+ flags = UP_TIMES;
|
|
|
7f4c2a |
upcall_cache_invalidate (frame, this, client, local->inode, flags,
|
|
|
7f4c2a |
stbuf, postparent, NULL);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -660,7 +660,7 @@ up_mkdir (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
EXIT_IF_UPCALL_OFF (this, out);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
- local = upcall_local_init (frame, this, loc->inode);
|
|
|
7f4c2a |
+ local = upcall_local_init (frame, this, loc->parent);
|
|
|
7f4c2a |
if (!local) {
|
|
|
7f4c2a |
op_errno = ENOMEM;
|
|
|
7f4c2a |
goto err;
|
|
|
7f4c2a |
@@ -702,7 +702,7 @@ up_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
/* As its a new file create, no need of sending notification */
|
|
|
7f4c2a |
/* However invalidate parent's entry */
|
|
|
7f4c2a |
- flags = UP_PARENT_DENTRY_FLAGS;
|
|
|
7f4c2a |
+ flags = UP_TIMES;
|
|
|
7f4c2a |
upcall_cache_invalidate (frame, this, client, local->inode, flags,
|
|
|
7f4c2a |
stbuf, postparent, NULL);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -723,7 +723,7 @@ up_create (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
EXIT_IF_UPCALL_OFF (this, out);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
- local = upcall_local_init (frame, this, loc->inode);
|
|
|
7f4c2a |
+ local = upcall_local_init (frame, this, loc->parent);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
if (!local) {
|
|
|
7f4c2a |
op_errno = ENOMEM;
|
|
|
7f4c2a |
@@ -1052,7 +1052,7 @@ up_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
/* invalidate parent's entry too */
|
|
|
7f4c2a |
- flags = UP_PARENT_DENTRY_FLAGS;
|
|
|
7f4c2a |
+ flags = UP_TIMES;
|
|
|
7f4c2a |
upcall_cache_invalidate (frame, this, client, local->inode, flags,
|
|
|
7f4c2a |
buf, postparent, NULL);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -1072,7 +1072,7 @@ up_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
EXIT_IF_UPCALL_OFF (this, out);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
- local = upcall_local_init (frame, this, loc->inode);
|
|
|
7f4c2a |
+ local = upcall_local_init (frame, this, loc->parent);
|
|
|
7f4c2a |
if (!local) {
|
|
|
7f4c2a |
op_errno = ENOMEM;
|
|
|
7f4c2a |
goto err;
|
|
|
7f4c2a |
@@ -1113,7 +1113,7 @@ up_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
/* invalidate parent's entry too */
|
|
|
7f4c2a |
- flags = UP_PARENT_DENTRY_FLAGS;
|
|
|
7f4c2a |
+ flags = UP_TIMES;
|
|
|
7f4c2a |
upcall_cache_invalidate (frame, this, client, local->inode, flags,
|
|
|
7f4c2a |
buf, postparent, NULL);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -1134,7 +1134,7 @@ up_symlink (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
EXIT_IF_UPCALL_OFF (this, out);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
- local = upcall_local_init (frame, this, loc->inode);
|
|
|
7f4c2a |
+ local = upcall_local_init (frame, this, loc->parent);
|
|
|
7f4c2a |
if (!local) {
|
|
|
7f4c2a |
op_errno = ENOMEM;
|
|
|
7f4c2a |
goto err;
|
|
|
7f4c2a |
--
|
|
|
7f4c2a |
1.7.1
|
|
|
7f4c2a |
|