summaryrefslogtreecommitdiffstats
path: root/xlators/features/upcall
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-12-14 17:52:37 +0530
committerNiels de Vos <ndevos@redhat.com>2016-02-16 00:51:54 -0800
commitf4282bd927e2e0d826d62cf1192102382c5697b2 (patch)
treef48f23fe9a91870e12bd13a7e4425fd581e215fd /xlators/features/upcall
parent888efdf5e0ab7d22c3fc227dc0dbfaec91b1d5d9 (diff)
Upcall/cache-invalidation: Use parent stbuf while updating parent entry
For *create* fops (CREATE, MKDIR, MKNOD), we invalidate the parent entry. Hence send parent attributes in the stat field. Also "UP_PARENT_DENTRY_FLAGS" has to be set only for the fops which shall result in two invalidations requests - one for the inode on which fop is being performed and another on parent entry. In case of CREATE/MKDIR/MKNOD fops, there shall be only one invalidation request sent, that too on parent inode. We send invalidation directly on parent inode's gfid. So there is no necessity to set these flags which when set shall endup invalidating the parent's parent entry. Change-Id: I7514ee08382081e3e060818ede497dbca26987dc BUG: 1291259 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/12962 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/features/upcall')
-rw-r--r--xlators/features/upcall/src/upcall-cache-invalidation.h2
-rw-r--r--xlators/features/upcall/src/upcall.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/xlators/features/upcall/src/upcall-cache-invalidation.h b/xlators/features/upcall/src/upcall-cache-invalidation.h
index 77286b063d8..964a72f63f2 100644
--- a/xlators/features/upcall/src/upcall-cache-invalidation.h
+++ b/xlators/features/upcall/src/upcall-cache-invalidation.h
@@ -43,7 +43,7 @@
#define UP_RENAME_FLAGS (UP_RENAME)
/* to invalidate parent directory entries for fops -rename, unlink,
- * rmdir, mkdir, create */
+ * rmdir, link */
#define UP_PARENT_DENTRY_FLAGS (UP_PARENT_TIMES)
/* for fop - unlink, link, rmdir, mkdir */
diff --git a/xlators/features/upcall/src/upcall.c b/xlators/features/upcall/src/upcall.c
index 3d0669b305e..1822d9b119c 100644
--- a/xlators/features/upcall/src/upcall.c
+++ b/xlators/features/upcall/src/upcall.c
@@ -626,7 +626,7 @@ up_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* invalidate parent's entry too */
flags = UP_TIMES;
upcall_cache_invalidate (frame, this, client, local->inode, flags,
- stbuf, postparent, NULL);
+ postparent, NULL, NULL);
out:
UPCALL_STACK_UNWIND (mkdir, frame, op_ret, op_errno,
@@ -687,7 +687,7 @@ up_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* However invalidate parent's entry */
flags = UP_TIMES;
upcall_cache_invalidate (frame, this, client, local->inode, flags,
- stbuf, postparent, NULL);
+ postparent, NULL, NULL);
out:
UPCALL_STACK_UNWIND (create, frame, op_ret, op_errno, fd,
@@ -1030,7 +1030,7 @@ up_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* invalidate parent's entry too */
flags = UP_TIMES;
upcall_cache_invalidate (frame, this, client, local->inode, flags,
- buf, postparent, NULL);
+ postparent, NULL, NULL);
out:
UPCALL_STACK_UNWIND (mknod, frame, op_ret, op_errno, inode, buf,
@@ -1090,7 +1090,7 @@ up_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* invalidate parent's entry too */
flags = UP_TIMES;
upcall_cache_invalidate (frame, this, client, local->inode, flags,
- buf, postparent, NULL);
+ postparent, NULL, NULL);
out:
UPCALL_STACK_UNWIND (symlink, frame, op_ret, op_errno, inode, buf,