summaryrefslogtreecommitdiffstats
path: root/xlators/features/upcall/src/upcall-internal.c
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-04-30 11:34:14 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-07 04:19:56 -0700
commit544004cb941efebc13d2e8c296d209965507adc8 (patch)
tree650397f64e33722078f45807c53f9dc570522dad /xlators/features/upcall/src/upcall-internal.c
parenta53eddfac357400faf636e28b10cd184c53301c5 (diff)
Upcall: Handle missing fops in the upcall xlator
Change-Id: I968980dc4df458ec427e33503363bbd017e1163e BUG: 1217723 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/10194 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/10564 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System
Diffstat (limited to 'xlators/features/upcall/src/upcall-internal.c')
-rw-r--r--xlators/features/upcall/src/upcall-internal.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/xlators/features/upcall/src/upcall-internal.c b/xlators/features/upcall/src/upcall-internal.c
index f4b308c1dca..8484113cc48 100644
--- a/xlators/features/upcall/src/upcall-internal.c
+++ b/xlators/features/upcall/src/upcall-internal.c
@@ -327,6 +327,24 @@ out:
return ret;
}
+void
+upcall_cache_invalidate_dir (call_frame_t *frame, xlator_t *this,
+ client_t *client, inode_t *inode, uint32_t flags)
+{
+ dentry_t *dentry;
+ dentry_t *dentry_tmp;
+
+ if (!is_cache_invalidation_enabled(this))
+ return;
+
+ list_for_each_entry_safe (dentry, dentry_tmp,
+ &inode->dentry_list,
+ inode_list) {
+ upcall_cache_invalidate (frame, this, client,
+ dentry->inode, flags);
+ }
+}
+
/*
* Given a gfid, client, first fetch upcall_entry_t based on gfid.
* Later traverse through the client list of that upcall entry. If this client
@@ -347,6 +365,9 @@ upcall_cache_invalidate (call_frame_t *frame, xlator_t *this, client_t *client,
upcall_inode_ctx_t *up_inode_ctx = NULL;
gf_boolean_t found = _gf_false;
+ if (!is_cache_invalidation_enabled(this))
+ return;
+
up_inode_ctx = ((upcall_local_t *)frame->local)->upcall_inode_ctx;
if (!up_inode_ctx)