From 04e673f14e31c60e4c9cde9072bcec610fe3884b Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 31 Dec 2012 10:03:32 +0530 Subject: protocol/client: Periodically attempt reopens If the brick is taken down and the hard disk is replaced and the brick is brought back up, the re-opens of the open-fds will fail because the file is not present on the brick. Re-opens are not attempted even if the files are re-created by self-heal until the brick is brought down after the files are re-created and brought back up. This is a problem with a VM-store in a replica-setup. Until the fd is re-opened the writes will never happen on the brick where the hard-disk is replaced. To handle this situation gracefully, client xlator is enhanced to perform finodelk, fxattrop, writev, readv using anonymous fds if the file is yet to be re-opened. If the fop succeeds then client xlator attempts re-open. Change-Id: I1cc6d1bbf8227cd996868ab2ed0a57fb05e00017 BUG: 821056 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4358 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/protocol/server/src/server-resolve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/protocol/server/src/server-resolve.c') diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c index 11b48818..159f6386 100644 --- a/xlators/protocol/server/src/server-resolve.c +++ b/xlators/protocol/server/src/server-resolve.c @@ -469,7 +469,7 @@ server_resolve_fd (call_frame_t *frame) fd_no = resolve->fd_no; - if (fd_no == -2) { + if (fd_no == GF_ANON_FD_NO) { server_resolve_anonfd (frame); return 0; } -- cgit