summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2012-12-31 10:03:32 +0530
committerAnand Avati <avati@redhat.com>2013-02-03 11:33:31 -0800
commit04e673f14e31c60e4c9cde9072bcec610fe3884b (patch)
treebc740a0943b9736ca3c8e1be3c01b69cb3790a44 /libglusterfs
parentf78d789c6e9ce29f18487bd6d6a3b8f66a30a464 (diff)
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 <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4358 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/fd.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libglusterfs/src/fd.h b/libglusterfs/src/fd.h
index 1077cfa8632..54290b1980b 100644
--- a/libglusterfs/src/fd.h
+++ b/libglusterfs/src/fd.h
@@ -24,6 +24,8 @@
#include "fd-lk.h"
#include "common-utils.h"
+#define GF_ANON_FD_NO -2
+
struct _inode;
struct _dict;
struct fd_lk_ctx;