summaryrefslogtreecommitdiff
path: root/filesystems/glusterfs/patches/patch-bz
diff options
context:
space:
mode:
Diffstat (limited to 'filesystems/glusterfs/patches/patch-bz')
-rw-r--r--filesystems/glusterfs/patches/patch-bz24
1 files changed, 24 insertions, 0 deletions
diff --git a/filesystems/glusterfs/patches/patch-bz b/filesystems/glusterfs/patches/patch-bz
new file mode 100644
index 00000000000..54c5022758c
--- /dev/null
+++ b/filesystems/glusterfs/patches/patch-bz
@@ -0,0 +1,24 @@
+$NetBSD: patch-bz,v 1.1 2011/11/28 08:42:39 manu Exp $
+
+When a client detects a changed gfid, it means another machine replaced
+the node. Return ESTALE that that the stall data get flushed. This avoid
+having the changed node being inaccessible forever because lookups still
+return the old deleted node.
+
+The fix is pulled from upstream.
+
+--- xlators/protocol/client/src/client3_1-fops.c.orig 2011-11-28 05:54:38.000000000 +0100
++++ xlators/protocol/client/src/client3_1-fops.c 2011-11-28 05:59:46.000000000 +0100
+@@ -2210,9 +2210,11 @@
+ if ((!uuid_is_null (inode->gfid))
+ && (uuid_compare (stbuf.ia_gfid, inode->gfid) != 0)) {
+ gf_log (frame->this->name, GF_LOG_WARNING,
+ "gfid changed for %s", local->loc.path);
+- memcpy(&stbuf.ia_gfid, &inode->gfid, sizeof(inode->gfid));
++ rsp.op_ret = -1;
++ op_errno = ESTALE;
++ goto out;
+ }
+
+ rsp.op_ret = 0;
+