diff options
author | Soumya Koduri <skoduri@redhat.com> | 2015-04-30 11:34:14 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-05-03 04:33:09 -0700 |
commit | dfa3942f67e11ce0bef0975173f63932b0db3143 (patch) | |
tree | 4d8347b2de2fe9f31773eeb26bc677cfda4fe93a /xlators/features/upcall/src/upcall-internal.c | |
parent | deedac1101c109895c9aff8e7a1171bea16a6d5e (diff) |
Upcall: Handle missing fops in the upcall xlator
Change-Id: I968980dc4df458ec427e33503363bbd017e1163e
BUG: 1200271
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/10194
Tested-by: NetBSD Build System
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/features/upcall/src/upcall-internal.c')
-rw-r--r-- | xlators/features/upcall/src/upcall-internal.c | 21 |
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 a7f0fd991cf..a2c33cb2ca7 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) |