diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2015-07-01 15:56:58 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-08-20 22:02:45 -0700 |
commit | 53e57a62ab4254f131c1d02b70fcb9b97f33306c (patch) | |
tree | e7a8d141d676cc7bfe8382979ed1e3ff79642374 /xlators/protocol/server/src/server.h | |
parent | 4efc8ea17f8452cf5a5f3a504419c1269d332d79 (diff) |
protocol/server: forget the inodes which got ENOENT in lookup
If a looked up object is removed from the backend, then upon getting a
revalidated lookup on that object ENOENT error is received. protocol/server
xlator handles it by removing dentry upon which ENOENT is received. But the
inode associated with it still remains in the inode table, and whoever does
nameless lookup on the gfid of that object will be able to do it successfully
despite the object being not present.
For handling this issue, upon getting ENOENT on a looked up entry in revalidate
lookups, protocol/server should forget the inode as well.
Though removing files directly from the backend is not allowed, in case of
objects corrupted due to bitrot and marked as bad by scrubber, objects are
removed directly from the backend in case of replicate volumes, so that the
object is healed from the good copy. For handling this, the inode of the bad
object removed from the backend should be forgotten. Otherwise, the inode which
knows the object it represents is bad, does not allow read/write operations
happening as part of self-heal.
Change-Id: I23b7a5bef919c98eea684aa1e977e317066cfc71
BUG: 1238188
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/11489
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server.h')
-rw-r--r-- | xlators/protocol/server/src/server.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server.h b/xlators/protocol/server/src/server.h index 6caf44926c9..1055b72dad5 100644 --- a/xlators/protocol/server/src/server.h +++ b/xlators/protocol/server/src/server.h @@ -172,4 +172,7 @@ server_submit_reply (call_frame_t *frame, rpcsvc_request_t *req, void *arg, int gf_server_check_setxattr_cmd (call_frame_t *frame, dict_t *dict); int gf_server_check_getxattr_cmd (call_frame_t *frame, const char *name); +void +forget_inode_if_no_dentry (inode_t *inode); + #endif /* !_SERVER_H */ |