summaryrefslogtreecommitdiff
path: root/filesystems
diff options
context:
space:
mode:
authormanu <manu>2011-11-28 08:42:38 +0000
committermanu <manu>2011-11-28 08:42:38 +0000
commit1160fa00792167a9523060daf39f0d9d6bbf954a (patch)
tree17d64e4832be222100fe2dbe0779b27a4ec95b4a /filesystems
parent5787f5aa15c37b6cbadee500e802c0f29d0b6625 (diff)
downloadpkgsrc-1160fa00792167a9523060daf39f0d9d6bbf954a.tar.gz
Update to glusterfs 3.2.5. This is a bug-fix release
Diffstat (limited to 'filesystems')
-rw-r--r--filesystems/glusterfs/Makefile7
-rw-r--r--filesystems/glusterfs/PLIST78
-rw-r--r--filesystems/glusterfs/distinfo19
-rw-r--r--filesystems/glusterfs/patches/patch-ae27
-rw-r--r--filesystems/glusterfs/patches/patch-ba45
-rw-r--r--filesystems/glusterfs/patches/patch-be10
-rw-r--r--filesystems/glusterfs/patches/patch-bq10
-rw-r--r--filesystems/glusterfs/patches/patch-br78
-rw-r--r--filesystems/glusterfs/patches/patch-bw2
-rw-r--r--filesystems/glusterfs/patches/patch-bx2
-rw-r--r--filesystems/glusterfs/patches/patch-by458
-rw-r--r--filesystems/glusterfs/patches/patch-bz24
12 files changed, 132 insertions, 628 deletions
diff --git a/filesystems/glusterfs/Makefile b/filesystems/glusterfs/Makefile
index 9fb296f161d..1210766fe67 100644
--- a/filesystems/glusterfs/Makefile
+++ b/filesystems/glusterfs/Makefile
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.23 2011/11/24 05:36:36 manu Exp $
+# $NetBSD: Makefile,v 1.24 2011/11/28 08:42:38 manu Exp $
#
-DISTNAME= glusterfs-3.2.3
-PKGREVISION= 8
+DISTNAME= glusterfs-3.2.5
CATEGORIES= filesystems
-MASTER_SITES= http://download.gluster.com/pub/gluster/glusterfs/3.2/3.2.3/
+MASTER_SITES= http://download.gluster.com/pub/gluster/glusterfs/3.2/3.2.5/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.gluster.org/
diff --git a/filesystems/glusterfs/PLIST b/filesystems/glusterfs/PLIST
index 5f63fcaff86..6d91c4c7993 100644
--- a/filesystems/glusterfs/PLIST
+++ b/filesystems/glusterfs/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.8 2011/09/27 12:45:02 manu Exp $
+@comment $NetBSD: PLIST,v 1.9 2011/11/28 08:42:38 manu Exp $
etc/glusterfs/xattr-init.sh
etc/glusterfs/glusterfs.vol.sample
etc/glusterfs/glusterfsd.vol.sample
@@ -7,44 +7,44 @@ etc/glusterfs/xattr-init.sh
lib/libglusterfs.la
lib/libgfrpc.la
lib/libgfxdr.la
-lib/glusterfs/3.2.3/auth/addr.la
-lib/glusterfs/3.2.3/auth/login.la
-lib/glusterfs/3.2.3/rpc-transport/socket.la
-lib/glusterfs/3.2.3/xlator/cluster/afr.la
-lib/glusterfs/3.2.3/xlator/cluster/dht.la
-lib/glusterfs/3.2.3/xlator/cluster/distribute.so
-lib/glusterfs/3.2.3/xlator/cluster/nufa.la
-lib/glusterfs/3.2.3/xlator/cluster/pump.la
-lib/glusterfs/3.2.3/xlator/cluster/replicate.so
-lib/glusterfs/3.2.3/xlator/cluster/stripe.la
-lib/glusterfs/3.2.3/xlator/cluster/switch.la
-lib/glusterfs/3.2.3/xlator/debug/error-gen.la
-lib/glusterfs/3.2.3/xlator/debug/io-stats.la
-lib/glusterfs/3.2.3/xlator/debug/trace.la
-lib/glusterfs/3.2.3/xlator/encryption/rot-13.la
-lib/glusterfs/3.2.3/xlator/features/access-control.so
-lib/glusterfs/3.2.3/xlator/features/locks.la
-lib/glusterfs/3.2.3/xlator/features/mac-compat.la
-lib/glusterfs/3.2.3/xlator/features/marker.la
-lib/glusterfs/3.2.3/xlator/features/posix-locks.so
-lib/glusterfs/3.2.3/xlator/features/quiesce.la
-lib/glusterfs/3.2.3/xlator/features/quota.la
-lib/glusterfs/3.2.3/xlator/features/read-only.la
-lib/glusterfs/3.2.3/xlator/mgmt/glusterd.la
-lib/glusterfs/3.2.3/xlator/mount/fuse.la
-lib/glusterfs/3.2.3/xlator/nfs/server.la
-lib/glusterfs/3.2.3/xlator/performance/io-cache.la
-lib/glusterfs/3.2.3/xlator/performance/io-threads.la
-lib/glusterfs/3.2.3/xlator/performance/quick-read.la
-lib/glusterfs/3.2.3/xlator/performance/read-ahead.la
-lib/glusterfs/3.2.3/xlator/performance/stat-prefetch.la
-lib/glusterfs/3.2.3/xlator/performance/write-behind.la
-lib/glusterfs/3.2.3/xlator/protocol/client.la
-lib/glusterfs/3.2.3/xlator/protocol/server.la
-lib/glusterfs/3.2.3/xlator/storage/posix.la
-lib/glusterfs/3.2.3/xlator/system/posix-acl.la
-lib/glusterfs/3.2.3/xlator/testing/features/trash.la
-lib/glusterfs/3.2.3/xlator/testing/performance/symlink-cache.la
+lib/glusterfs/3.2.5/auth/addr.la
+lib/glusterfs/3.2.5/auth/login.la
+lib/glusterfs/3.2.5/rpc-transport/socket.la
+lib/glusterfs/3.2.5/xlator/cluster/afr.la
+lib/glusterfs/3.2.5/xlator/cluster/dht.la
+lib/glusterfs/3.2.5/xlator/cluster/distribute.so
+lib/glusterfs/3.2.5/xlator/cluster/nufa.la
+lib/glusterfs/3.2.5/xlator/cluster/pump.la
+lib/glusterfs/3.2.5/xlator/cluster/replicate.so
+lib/glusterfs/3.2.5/xlator/cluster/stripe.la
+lib/glusterfs/3.2.5/xlator/cluster/switch.la
+lib/glusterfs/3.2.5/xlator/debug/error-gen.la
+lib/glusterfs/3.2.5/xlator/debug/io-stats.la
+lib/glusterfs/3.2.5/xlator/debug/trace.la
+lib/glusterfs/3.2.5/xlator/encryption/rot-13.la
+lib/glusterfs/3.2.5/xlator/features/access-control.so
+lib/glusterfs/3.2.5/xlator/features/locks.la
+lib/glusterfs/3.2.5/xlator/features/mac-compat.la
+lib/glusterfs/3.2.5/xlator/features/marker.la
+lib/glusterfs/3.2.5/xlator/features/posix-locks.so
+lib/glusterfs/3.2.5/xlator/features/quiesce.la
+lib/glusterfs/3.2.5/xlator/features/quota.la
+lib/glusterfs/3.2.5/xlator/features/read-only.la
+lib/glusterfs/3.2.5/xlator/mgmt/glusterd.la
+lib/glusterfs/3.2.5/xlator/mount/fuse.la
+lib/glusterfs/3.2.5/xlator/nfs/server.la
+lib/glusterfs/3.2.5/xlator/performance/io-cache.la
+lib/glusterfs/3.2.5/xlator/performance/io-threads.la
+lib/glusterfs/3.2.5/xlator/performance/quick-read.la
+lib/glusterfs/3.2.5/xlator/performance/read-ahead.la
+lib/glusterfs/3.2.5/xlator/performance/stat-prefetch.la
+lib/glusterfs/3.2.5/xlator/performance/write-behind.la
+lib/glusterfs/3.2.5/xlator/protocol/client.la
+lib/glusterfs/3.2.5/xlator/protocol/server.la
+lib/glusterfs/3.2.5/xlator/storage/posix.la
+lib/glusterfs/3.2.5/xlator/system/posix-acl.la
+lib/glusterfs/3.2.5/xlator/testing/features/trash.la
+lib/glusterfs/3.2.5/xlator/testing/performance/symlink-cache.la
man/man8/glusterfs.8
man/man8/mount.glusterfs.8
man/man8/gluster.8
diff --git a/filesystems/glusterfs/distinfo b/filesystems/glusterfs/distinfo
index 226d572e119..ef99734bc7e 100644
--- a/filesystems/glusterfs/distinfo
+++ b/filesystems/glusterfs/distinfo
@@ -1,21 +1,20 @@
-$NetBSD: distinfo,v 1.19 2011/11/24 05:36:36 manu Exp $
+$NetBSD: distinfo,v 1.20 2011/11/28 08:42:38 manu Exp $
-SHA1 (glusterfs-3.2.3.tar.gz) = 7a36e496d9ac3fbf11123bb42884445334d07f06
-RMD160 (glusterfs-3.2.3.tar.gz) = 89d6a5f9c1362e1fe4d88e69465311069552d319
-Size (glusterfs-3.2.3.tar.gz) = 2376000 bytes
+SHA1 (glusterfs-3.2.5.tar.gz) = 10f2e81ec7f118432c279236509fc3d89ab8f690
+RMD160 (glusterfs-3.2.5.tar.gz) = 13d0f8c1a2a1e7d39a43899bc9d09f7f13fea844
+Size (glusterfs-3.2.5.tar.gz) = 2413509 bytes
SHA1 (patch-aa) = bfd1dbcb6945dd387d88bd96616e4bc29c3e0628
SHA1 (patch-ab) = d240bfd8bd8e5994f612a3387cd75f30bb91c8d7
SHA1 (patch-ac) = 21d86775c2174ea630404a1a329dfd49c7f493d9
-SHA1 (patch-ae) = 98c7ae07209e0870851007cda087ec381bd1f551
+SHA1 (patch-ae) = d5d0dce5cb82c61fbb02289123d0be34ce835e18
SHA1 (patch-af) = ac9333cc55ad0cf42233e3c69b32e22c483c077a
SHA1 (patch-an) = 21f56d5379023bd2ea3432b4e3e3f9a0979c496f
SHA1 (patch-ao) = 26e350655e276c8cb3ecb3cc9b7c0a4e7ab2ff7b
SHA1 (patch-ar) = 27d0288083d06623a328e851a776095aa1f1d2df
SHA1 (patch-as) = a2c637bf52151e85969927f281e432693ac539ba
SHA1 (patch-ax) = 054942de06c3df60ffc0c190dd2702f77edd9ec6
-SHA1 (patch-ba) = dba2b6826b42c398fc590b91d1f58b88c7bcc7f2
SHA1 (patch-bb) = f7b79676322064396242b0f3e6cd81c180c7dd8e
-SHA1 (patch-be) = 72fd161c97ac384b93411e120c4f4b798e45d975
+SHA1 (patch-be) = f178ee8106c349354f7f21bc37fca3ca47ca9e44
SHA1 (patch-bf) = 0f182ccd632b5e622237bd95c9978c113f8ce531
SHA1 (patch-bh) = d88d4e8b863f36b2c27c4f5eff2fdc235ef76fd8
SHA1 (patch-bj) = 9b8b2374d4c197e60a1990b09be1117bf0c0a552
@@ -25,12 +24,12 @@ SHA1 (patch-bm) = 401fe1c2bbf71474e2238c3e6c3fe5a5c614c4f5
SHA1 (patch-bn) = 98ce48be2239f42edc4ef8e26644305f6aa0a5eb
SHA1 (patch-bo) = be0dcdcc0acb6a5e54664372c34a28f1307fbd00
SHA1 (patch-bp) = 77463ea7d739d532e20dbe5bd66d58c22ba0c248
-SHA1 (patch-bq) = 7a59abc6ea5966a9f99be86fe31e3507f02b932a
-SHA1 (patch-br) = c60d583f8f658ff56717a00b3cc1b5bd983611e6
+SHA1 (patch-bq) = 083f22383b88890f9e6f2c90a4435657ccd10579
+SHA1 (patch-br) = 5cd1d2692e34173f7e9f60b170373d499067d224
SHA1 (patch-bs) = d2f79ef19143f74f5a12187ea2dfd9e1ed92b726
SHA1 (patch-bt) = 58f8e5ce66e6b691dd9972bd649dc18f7d5a258a
SHA1 (patch-bu) = 006a6802958fad3950eadad456e362b7f4c2ca4a
SHA1 (patch-bv) = 2c3b654e5858bf0948307ca6ae7048e276fca9ef
SHA1 (patch-bw) = dca12eb81163fd1a0ada13165e990ddcb8fefbf2
SHA1 (patch-bx) = b2aca473091bb64d14c6da046379d33ca8a5785e
-SHA1 (patch-by) = 0ad488ceea4d388636fb2cc732e6dfadecf0afbf
+SHA1 (patch-bz) = 1b5756377e6eabfb93e07a8aab8007fca40e8a38
diff --git a/filesystems/glusterfs/patches/patch-ae b/filesystems/glusterfs/patches/patch-ae
index 48889308ada..ad22ecba1de 100644
--- a/filesystems/glusterfs/patches/patch-ae
+++ b/filesystems/glusterfs/patches/patch-ae
@@ -1,4 +1,4 @@
-$NetBSD: patch-ae,v 1.9 2011/11/24 05:36:36 manu Exp $
+$NetBSD: patch-ae,v 1.10 2011/11/28 08:42:39 manu Exp $
On NetBSD use libperfuse(3), rename umount2(2) as unmount(2), and skip
inexistant /etc/mtab management.
@@ -7,8 +7,8 @@ Include <signal.h> for sigprocmask(2)
Use /sbin/mount on NetBSD, not /bin/mount
---- contrib/fuse-lib/mount.c.orig 2011-08-23 14:31:36.000000000 +0200
-+++ contrib/fuse-lib/mount.c 2011-11-24 03:31:11.000000000 +0100
+--- contrib/fuse-lib/mount.c.orig 2011-11-14 14:45:58.000000000 +0100
++++ contrib/fuse-lib/mount.c 2011-11-27 08:53:09.000000000 +0100
@@ -19,16 +19,30 @@
#include <limits.h>
#include <fcntl.h>
@@ -78,3 +78,24 @@ Use /sbin/mount on NetBSD, not /bin/mount
}
res = waitpid (res, &status, 0);
if (res == -1)
+@@ -562,8 +580,9 @@
+ goto out;
+ else
+ mounted = 1;
+
++#ifndef __NetBSD__
+ if (geteuid () == 0) {
+ char *newmnt = fuse_mnt_resolve_path ("fuse", mountpoint);
+
+ if (!newmnt) {
+@@ -580,8 +599,9 @@
+
+ goto out;
+ }
+ }
++#endif /* __NetBSD__ */
+
+ out:
+ if (ret == -1) {
+ if (mounted)
+
diff --git a/filesystems/glusterfs/patches/patch-ba b/filesystems/glusterfs/patches/patch-ba
deleted file mode 100644
index 99eff8c95e4..00000000000
--- a/filesystems/glusterfs/patches/patch-ba
+++ /dev/null
@@ -1,45 +0,0 @@
-$NetBSD: patch-ba,v 1.7 2011/09/18 01:36:06 manu Exp $
-
-glibc dirname() modify the string it is given and returns it.
-glusterfs takes this behavior for granted, and assume that if it
-gives a malloc'ed string to dirname(), then it can free()) the
-return value.
-
-Here is what SUSv2 says:
-http://opengroup.org/onlinepubs/007908799/xsh/dirname.html
-"The dirname() function may modify the string pointed to by path,
-and may return a pointer to static storage"
-
-At least NetBSD returns a static storage. glusterfs will return it to
-a calling function that has the responsability to free it, causing
-a SIGSEGV.
-
---- xlators/performance/stat-prefetch/src/stat-prefetch.c.orig 2011-08-23 14:31:41.000000000 +0200
-+++ xlators/performance/stat-prefetch/src/stat-prefetch.c 2011-09-17 15:45:29.000000000 +0200
-@@ -949,18 +949,24 @@
- path = dirname (cpy);
- switch (i)
- {
- case 0:
-- *parent = path;
-+ *parent = gf_strdup (path);
-+ if (*parent == NULL)
-+ goto out;
- break;
- case 1:
-- *grand_parent = path;
-+ *grand_parent = gf_strdup (path);
-+ if (*grand_parent == NULL)
-+ goto out;
- break;
- }
- }
-
- ret = 0;
- out:
-+ if (cpy != NULL)
-+ GF_FREE(cpy);
- return ret;
- }
-
-
diff --git a/filesystems/glusterfs/patches/patch-be b/filesystems/glusterfs/patches/patch-be
index 9cc4683b0a3..b1c0cf401cf 100644
--- a/filesystems/glusterfs/patches/patch-be
+++ b/filesystems/glusterfs/patches/patch-be
@@ -1,14 +1,14 @@
-$NetBSD: patch-be,v 1.6 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-be,v 1.7 2011/11/28 08:42:39 manu Exp $
basename() and dirname() are not supposed to be thread-safe, and NetBSD's
implementation is not. glusterfs assume the functions are thread-safe.
Borrow basename() and rdirname() form glibc and make NetBSD use them.
---- libglusterfs/src/compat.c.orig 2011-07-14 14:21:10.000000000 +0200
-+++ libglusterfs/src/compat.c 2011-07-22 09:00:15.000000000 +0200
-@@ -529,8 +529,412 @@
+--- libglusterfs/src/compat.c.orig 2011-11-27 07:55:13.000000000 +0100
++++ libglusterfs/src/compat.c 2011-11-27 07:55:13.000000000 +0100
+@@ -550,8 +550,412 @@
+
- }
#endif /* GF_SOLARIS_HOST_OS */
+#ifdef __NetBSD__
diff --git a/filesystems/glusterfs/patches/patch-bq b/filesystems/glusterfs/patches/patch-bq
index 5daf8814ad3..2c165002e07 100644
--- a/filesystems/glusterfs/patches/patch-bq
+++ b/filesystems/glusterfs/patches/patch-bq
@@ -1,9 +1,9 @@
-$NetBSD: patch-bq,v 1.7 2011/10/06 02:19:06 manu Exp $
+$NetBSD: patch-bq,v 1.8 2011/11/28 08:42:39 manu Exp $
Make sure gluseterfsd listens on the same address family as glusterd
---- xlators/mgmt/glusterd/src/glusterd-utils.c.orig 2011-08-23 14:31:40.000000000 +0200
-+++ xlators/mgmt/glusterd/src/glusterd-utils.c 2011-09-17 15:45:30.000000000 +0200
+--- xlators/mgmt/glusterd/src/glusterd-utils.c.orig 2011-11-27 07:38:16.000000000 +0100
++++ xlators/mgmt/glusterd/src/glusterd-utils.c 2011-11-27 07:38:16.000000000 +0100
@@ -88,8 +88,52 @@
//TODO: set timestamp
return 0;
@@ -57,7 +57,7 @@ Make sure gluseterfsd listens on the same address family as glusterd
glusterd_is_loopback_localhost (const struct sockaddr *sa, char *hostname)
{
GF_ASSERT (sa);
-@@ -1030,8 +1074,10 @@
+@@ -1032,8 +1076,10 @@
int rdma_port = 0;
FILE *file = NULL;
gf_boolean_t is_locked = _gf_false;
@@ -68,7 +68,7 @@ Make sure gluseterfsd listens on the same address family as glusterd
GF_ASSERT (volinfo);
GF_ASSERT (brickinfo);
-@@ -1110,14 +1156,19 @@
+@@ -1112,14 +1158,19 @@
port = brickinfo->port;
if (!port)
port = pmap_registry_alloc (THIS);
diff --git a/filesystems/glusterfs/patches/patch-br b/filesystems/glusterfs/patches/patch-br
index 67dcb27f0e3..e8678cc17cd 100644
--- a/filesystems/glusterfs/patches/patch-br
+++ b/filesystems/glusterfs/patches/patch-br
@@ -1,4 +1,4 @@
-$NetBSD: patch-br,v 1.8 2011/10/30 05:07:15 manu Exp $
+$NetBSD: patch-br,v 1.9 2011/11/28 08:42:39 manu Exp $
Use linkat(2) if available so that we can make a hardlink to symlink
itself, instead of symlink destination, like link(2) does. This is
@@ -8,11 +8,10 @@ glusterfsd really wants to hardlink the symlink and not its target.
If linkat(2) is inavailable, then moving a symlink on distributed
volumes fails.
-Also pull upstreampatch that fix inode generation so that values
-are reliable
+Correctly cas gfid when producing inode to avoid it getting garbled
---- xlators/storage/posix/src/posix.c.orig 2011-08-23 14:31:42.000000000 +0200
-+++ xlators/storage/posix/src/posix.c 2011-10-28 14:59:13.000000000 +0200
+--- xlators/storage/posix/src/posix.c.orig 2011-11-14 14:46:03.000000000 +0100
++++ xlators/storage/posix/src/posix.c 2011-11-27 10:09:03.000000000 +0100
@@ -36,8 +36,12 @@
#ifndef GF_BSD_HOST_OS
#include <alloca.h>
@@ -26,53 +25,18 @@ are reliable
#include "md5.h"
#include "checksum.h"
#include "dict.h"
-@@ -244,8 +248,23 @@
+@@ -286,9 +290,9 @@
+ int i = 0;
- return ret;
- }
-
-+void
-+posix_fill_ino_from_gfid (xlator_t *this, struct iatt *buf)
-+{
-+ uint64_t temp_ino = 0;
-+ int j = 0;
-+ int i = 0;
-+
-+ /* consider least significant 8 bytes of value out of gfid */
-+ for (i = 15; i > (15 - 8); i--) {
+ /* consider least significant 8 bytes of value out of gfid */
+ for (i = 15; i > (15 - 8); i--) {
+- temp_ino += buf->ia_gfid[i] << j;
+ temp_ino += (uint64_t)(buf->ia_gfid[i]) << j;
-+ j += 8;
-+ }
-+
-+ buf->ia_ino = temp_ino;
-+}
-
- int
- posix_lstat_with_gfid (xlator_t *this, const char *path, struct iatt *stbuf_p)
- {
-@@ -265,8 +284,10 @@
- ret = posix_fill_gfid_path (this, path, &stbuf);
- if (ret)
- gf_log_callingfn (this->name, GF_LOG_DEBUG, "failed to get gfid");
-
-+ posix_fill_ino_from_gfid (this, &stbuf);
-+
- if (stbuf_p)
- *stbuf_p = stbuf;
- out:
- return ret;
-@@ -292,8 +313,10 @@
- ret = posix_fill_gfid_fd (this, fd, &stbuf);
- if (ret)
- gf_log_callingfn (this->name, GF_LOG_DEBUG, "failed to get gfid");
-
-+ posix_fill_ino_from_gfid (this, &stbuf);
-+
- if (stbuf_p)
- *stbuf_p = stbuf;
+ j += 8;
+ }
- out:
-@@ -1232,8 +1255,13 @@
+ buf->ia_ino = temp_ino;
+@@ -1311,8 +1315,13 @@
loc->path, strerror (op_errno));
goto out;
}
@@ -86,7 +50,7 @@ are reliable
if (op_ret == -1) {
op_errno = errno;
-@@ -2125,9 +2153,20 @@
+@@ -2204,9 +2213,20 @@
newparentpath, strerror (op_errno));
goto out;
}
@@ -107,23 +71,23 @@ are reliable
op_errno = errno;
gf_log (this->name, GF_LOG_ERROR,
"link %s to %s failed: %s",
-@@ -4376,13 +4415,15 @@
+@@ -4455,14 +4475,15 @@
/* pick ENOENT to indicate EOF */
op_errno = errno;
-- if (whichop == GF_FOP_READDIRP) {
-- list_for_each_entry (tmp_entry, &entries.list, list) {
-- strcpy (entry_path + real_path_len + 1,
-- tmp_entry->d_name);
-- posix_lstat_with_gfid (this, entry_path, &stbuf);
+ list_for_each_entry (tmp_entry, &entries.list, list) {
+ strcpy (entry_path + real_path_len + 1,
+ tmp_entry->d_name);
+ posix_lstat_with_gfid (this, entry_path, &stbuf);
+ tmp_entry->d_ino = stbuf.ia_ino;
+
-+ if (whichop == GF_FOP_READDIRP) {
+ if (whichop == GF_FOP_READDIRP) {
+- list_for_each_entry (tmp_entry, &entries.list, list) {
+- strcpy (entry_path + real_path_len + 1,
+- tmp_entry->d_name);
+- posix_lstat_with_gfid (this, entry_path, &stbuf);
+- tmp_entry->d_ino = stbuf.ia_ino;
tmp_entry->d_stat = stbuf;
}
}
diff --git a/filesystems/glusterfs/patches/patch-bw b/filesystems/glusterfs/patches/patch-bw
index 0b894fc1c9a..233bdb0a70f 100644
--- a/filesystems/glusterfs/patches/patch-bw
+++ b/filesystems/glusterfs/patches/patch-bw
@@ -1,4 +1,4 @@
-$NetBSD: patch-bw,v 1.1 2011/10/16 05:45:19 manu Exp $
+$NetBSD: patch-bw,v 1.2 2011/11/28 08:42:39 manu Exp $
usleep(3) shall not be called with argument higher than 1s
diff --git a/filesystems/glusterfs/patches/patch-bx b/filesystems/glusterfs/patches/patch-bx
index 068cedd55d9..37609ef33cd 100644
--- a/filesystems/glusterfs/patches/patch-bx
+++ b/filesystems/glusterfs/patches/patch-bx
@@ -1,4 +1,4 @@
-$NetBSD: patch-bx,v 1.1 2011/10/25 08:34:28 manu Exp $
+$NetBSD: patch-bx,v 1.2 2011/11/28 08:42:39 manu Exp $
glusterfs may need lots of data, raise the limit and hope there's enough
ram ...
diff --git a/filesystems/glusterfs/patches/patch-by b/filesystems/glusterfs/patches/patch-by
deleted file mode 100644
index b753b25be39..00000000000
--- a/filesystems/glusterfs/patches/patch-by
+++ /dev/null
@@ -1,458 +0,0 @@
-$NetBSD: patch-by,v 1.1 2011/10/30 05:07:15 manu Exp $
-
-Pull inode generation fix from upstream
-
-
---- xlators/cluster/afr/src/afr-common.c.orig 2011-08-23 14:31:39.000000000 +0200
-+++ xlators/cluster/afr/src/afr-common.c 2011-10-29 10:13:59.000000000 +0200
-@@ -891,12 +891,9 @@
-
- first_up_child = afr_first_up_child (priv);
-
- if (child_index == first_up_child) {
-- local->cont.lookup.ino =
-- afr_itransform (buf->ia_ino,
-- priv->child_count,
-- first_up_child);
-+ local->cont.lookup.ino = buf->ia_ino;
- }
-
- if (local->success_count == 0) {
- if (local->op_errno != ESTALE)
-@@ -919,11 +916,10 @@
- uuid_copy (local->loc.gfid, buf->ia_gfid);
- uuid_copy (local->loc.pargfid,
- postparent->ia_gfid);
-
-- lookup_buf->ia_ino = afr_itransform (buf->ia_ino,
-- priv->child_count,
-- child_index);
-+ lookup_buf->ia_ino = buf->ia_ino;
-+
- if (priv->read_child >= 0) {
- afr_set_read_child (this,
- local->cont.lookup.inode,
- priv->read_child);
-@@ -1014,12 +1010,9 @@
-
- first_up_child = afr_first_up_child (priv);
-
- if (child_index == first_up_child) {
-- local->cont.lookup.ino =
-- afr_itransform (buf->ia_ino,
-- priv->child_count,
-- first_up_child);
-+ local->cont.lookup.ino = buf->ia_ino;
- }
-
- /* in case of revalidate, we need to send stat of the
- * child whose stat was sent during the first lookup.
-@@ -1039,11 +1032,9 @@
- local->cont.lookup.postparent = *postparent;
-
- *lookup_buf = *buf;
-
-- lookup_buf->ia_ino = afr_itransform (buf->ia_ino,
-- priv->child_count,
-- child_index);
-+ lookup_buf->ia_ino = buf->ia_ino;
-
- if (priv->read_child >= 0) {
- afr_set_read_child (this,
- local->cont.lookup.inode,
-@@ -1581,11 +1572,8 @@
-
- call_count = afr_frame_return (frame);
-
- if (call_count == 0) {
-- local->cont.fsync.prebuf.ia_ino = local->cont.fsync.ino;
-- local->cont.fsync.postbuf.ia_ino = local->cont.fsync.ino;
--
- AFR_STACK_UNWIND (fsync, frame, local->op_ret, local->op_errno,
- &local->cont.fsync.prebuf,
- &local->cont.fsync.postbuf);
- }
---- xlators/cluster/afr/src/afr-dir-read.c.orig 2011-08-23 14:31:39.000000000 +0200
-+++ xlators/cluster/afr/src/afr-dir-read.c 2011-10-29 10:14:22.000000000 +0200
-@@ -494,12 +494,8 @@
- if (op_ret == -1)
- goto out;
-
- list_for_each_entry_safe (entry, tmp, &entries->list, list) {
-- entry->d_ino = afr_itransform (entry->d_ino,
-- priv->child_count,
-- child_index);
--
- if ((local->fd->inode == local->fd->inode->table->root)
- && !strcmp (entry->d_name, GF_REPLICATE_TRASH_DIR)) {
- list_del_init (&entry->list);
- GF_FREE (entry);
-@@ -519,9 +515,8 @@
- {
- afr_private_t * priv = NULL;
- afr_local_t * local = NULL;
- xlator_t ** children = NULL;
-- ino_t inum = 0;
- int call_child = 0;
- int first_call_child = 0;
- int ret = 0;
- gf_dirent_t * entry = NULL;
-@@ -581,15 +576,8 @@
- }
-
- if (op_ret != -1) {
- list_for_each_entry_safe (entry, tmp, &entries->list, list) {
-- inum = afr_itransform (entry->d_ino, priv->child_count,
-- call_child);
-- entry->d_ino = inum;
-- inum = afr_itransform (entry->d_stat.ia_ino,
-- priv->child_count, call_child);
-- entry->d_stat.ia_ino = inum;
--
- if ((local->fd->inode == local->fd->inode->table->root)
- && !strcmp (entry->d_name, GF_REPLICATE_TRASH_DIR)) {
- list_del_init (&entry->list);
- GF_FREE (entry);
---- xlators/cluster/afr/src/afr-dir-write.c.orig 2011-08-23 14:31:39.000000000 +0200
-+++ xlators/cluster/afr/src/afr-dir-write.c 2011-10-28 06:50:34.000000000 +0200
-@@ -100,13 +100,8 @@
- } else {
- unwind_buf = &local->cont.create.buf;
- }
-
-- unwind_buf->ia_ino = local->cont.create.ino;
--
-- local->cont.create.preparent.ia_ino = local->cont.create.parent_ino;
-- local->cont.create.postparent.ia_ino = local->cont.create.parent_ino;
--
- AFR_STACK_UNWIND (create, main_frame,
- local->op_ret, local->op_errno,
- local->cont.create.fd,
- local->cont.create.inode,
-@@ -173,13 +168,8 @@
-
- if (local->success_count == 0) {
- local->cont.create.buf = *buf;
-
-- local->cont.create.ino =
-- afr_itransform (buf->ia_ino,
-- priv->child_count,
-- child_index);
--
- if (priv->read_child >= 0) {
- afr_set_read_child (this, inode,
- priv->read_child);
- } else {
-@@ -187,15 +177,8 @@
- local->read_child_index);
- }
- }
-
-- if (child_index == local->first_up_child) {
-- local->cont.create.ino =
-- afr_itransform (buf->ia_ino,
-- priv->child_count,
-- local->first_up_child);
-- }
--
- if (child_index == local->read_child_index) {
- local->cont.create.read_child_buf = *buf;
- local->cont.create.preparent = *preparent;
- local->cont.create.postparent = *postparent;
-@@ -381,13 +364,8 @@
- } else {
- unwind_buf = &local->cont.mknod.buf;
- }
-
-- unwind_buf->ia_ino = local->cont.mknod.ino;
--
-- local->cont.mknod.preparent.ia_ino = local->cont.mknod.parent_ino;
-- local->cont.mknod.postparent.ia_ino = local->cont.mknod.parent_ino;
--
- AFR_STACK_UNWIND (mknod, main_frame,
- local->op_ret, local->op_errno,
- local->cont.mknod.inode,
- unwind_buf, &local->cont.mknod.preparent,
-@@ -423,12 +401,8 @@
- local->op_ret = op_ret;
-
- if (local->success_count == 0){
- local->cont.mknod.buf = *buf;
-- local->cont.mknod.ino =
-- afr_itransform (buf->ia_ino,
-- priv->child_count,
-- child_index);
-
- if (priv->read_child >= 0) {
- afr_set_read_child (this, inode,
- priv->read_child);
-@@ -437,15 +411,8 @@
- local->read_child_index);
- }
- }
-
-- if (child_index == local->first_up_child) {
-- local->cont.mknod.ino =
-- afr_itransform (buf->ia_ino,
-- priv->child_count,
-- local->first_up_child);
-- }
--
- if (child_index == local->read_child_index) {
- local->cont.mknod.read_child_buf = *buf;
- local->cont.mknod.preparent = *preparent;
- local->cont.mknod.postparent = *postparent;
-@@ -624,13 +591,8 @@
- } else {
- unwind_buf = &local->cont.mkdir.buf;
- }
-
-- unwind_buf->ia_ino = local->cont.mkdir.ino;
--
-- local->cont.mkdir.preparent.ia_ino = local->cont.mkdir.parent_ino;
-- local->cont.mkdir.postparent.ia_ino = local->cont.mkdir.parent_ino;
--
- AFR_STACK_UNWIND (mkdir, main_frame,
- local->op_ret, local->op_errno,
- local->cont.mkdir.inode,
- unwind_buf, &local->cont.mkdir.preparent,
-@@ -667,13 +629,8 @@
-
- if (local->success_count == 0) {
- local->cont.mkdir.buf = *buf;
-
-- local->cont.mkdir.ino =
-- afr_itransform (buf->ia_ino,
-- priv->child_count,
-- child_index);
--
- if (priv->read_child >= 0) {
- afr_set_read_child (this, inode,
- priv->read_child);
- } else {
-@@ -681,15 +638,8 @@
- local->read_child_index);
- }
- }
-
-- if (child_index == local->first_up_child) {
-- local->cont.mkdir.ino =
-- afr_itransform (buf->ia_ino,
-- priv->child_count,
-- local->first_up_child);
-- }
--
- if (child_index == local->read_child_index) {
- local->cont.mkdir.read_child_buf = *buf;
- local->cont.mkdir.preparent = *preparent;
- local->cont.mkdir.postparent = *postparent;
-@@ -869,13 +819,8 @@
- } else {
- unwind_buf = &local->cont.link.buf;
- }
-
-- unwind_buf->ia_ino = local->cont.link.ino;
--
-- local->cont.link.preparent.ia_ino = local->cont.link.parent_ino;
-- local->cont.link.postparent.ia_ino = local->cont.link.parent_ino;
--
- AFR_STACK_UNWIND (link, main_frame,
- local->op_ret, local->op_errno,
- local->cont.link.inode,
- unwind_buf, &local->cont.link.preparent,
-@@ -1099,13 +1044,8 @@
- } else {
- unwind_buf = &local->cont.symlink.buf;
- }
-
-- unwind_buf->ia_ino = local->cont.symlink.ino;
--
-- local->cont.symlink.preparent.ia_ino = local->cont.symlink.parent_ino;
-- local->cont.symlink.postparent.ia_ino = local->cont.symlink.parent_ino;
--
- AFR_STACK_UNWIND (symlink, main_frame,
- local->op_ret, local->op_errno,
- local->cont.symlink.inode,
- unwind_buf, &local->cont.symlink.preparent,
-@@ -1141,11 +1081,8 @@
- local->op_ret = op_ret;
-
- if (local->success_count == 0) {
- local->cont.symlink.buf = *buf;
-- local->cont.symlink.ino =
-- afr_itransform (buf->ia_ino, priv->child_count,
-- child_index);
-
- if (priv->read_child >= 0) {
- afr_set_read_child (this, inode,
- priv->read_child);
-@@ -1154,15 +1091,8 @@
- local->read_child_index);
- }
- }
-
-- if (child_index == local->first_up_child) {
-- local->cont.symlink.ino =
-- afr_itransform (buf->ia_ino,
-- priv->child_count,
-- local->first_up_child);
-- }
--
- if (child_index == local->read_child_index) {
- local->cont.symlink.read_child_buf = *buf;
- local->cont.symlink.preparent = *preparent;
- local->cont.symlink.postparent = *postparent;
-@@ -1341,15 +1271,8 @@
- } else {
- unwind_buf = &local->cont.rename.buf;
- }
-
-- unwind_buf->ia_ino = local->cont.rename.ino;
--
-- local->cont.rename.preoldparent.ia_ino = local->cont.rename.oldparent_ino;
-- local->cont.rename.postoldparent.ia_ino = local->cont.rename.oldparent_ino;
-- local->cont.rename.prenewparent.ia_ino = local->cont.rename.newparent_ino;
-- local->cont.rename.postnewparent.ia_ino = local->cont.rename.newparent_ino;
--
- AFR_STACK_UNWIND (rename, main_frame,
- local->op_ret, local->op_errno,
- unwind_buf,
- &local->cont.rename.preoldparent,
-@@ -1558,11 +1481,8 @@
- }
- UNLOCK (&frame->lock);
-
- if (main_frame) {
-- local->cont.unlink.preparent.ia_ino = local->cont.unlink.parent_ino;
-- local->cont.unlink.postparent.ia_ino = local->cont.unlink.parent_ino;
--
- AFR_STACK_UNWIND (unlink, main_frame,
- local->op_ret, local->op_errno,
- &local->cont.unlink.preparent,
- &local->cont.unlink.postparent);
-@@ -1758,11 +1678,8 @@
- }
- UNLOCK (&frame->lock);
-
- if (main_frame) {
-- local->cont.rmdir.preparent.ia_ino = local->cont.rmdir.parent_ino;
-- local->cont.rmdir.postparent.ia_ino = local->cont.rmdir.parent_ino;
--
- AFR_STACK_UNWIND (rmdir, main_frame,
- local->op_ret, local->op_errno,
- &local->cont.rmdir.preparent,
- &local->cont.rmdir.postparent);
---- xlators/cluster/afr/src/afr-inode-read.c.orig 2011-08-23 14:31:39.000000000 +0200
-+++ xlators/cluster/afr/src/afr-inode-read.c 2011-10-28 06:50:34.000000000 +0200
-@@ -222,11 +222,8 @@
- }
-
- out:
- if (unwind) {
-- if (buf)
-- buf->ia_ino = local->cont.stat.ino;
--
- AFR_STACK_UNWIND (stat, frame, op_ret, op_errno, buf);
- }
-
- return 0;
-@@ -344,11 +341,8 @@
- }
-
- out:
- if (unwind) {
-- if (buf)
-- buf->ia_ino = local->cont.fstat.ino;
--
- AFR_STACK_UNWIND (fstat, frame, op_ret, op_errno, buf);
- }
-
- return 0;
-@@ -469,11 +463,8 @@
- }
-
- out:
- if (unwind) {
-- if (sbuf)
-- sbuf->ia_ino = local->cont.readlink.ino;
--
- AFR_STACK_UNWIND (readlink, frame, op_ret, op_errno, buf, sbuf);
- }
-
- return 0;
-@@ -876,11 +867,8 @@
- }
-
- out:
- if (unwind) {
-- if (buf && local)
-- buf->ia_ino = local->cont.readv.ino;
--
- AFR_STACK_UNWIND (readv, frame, op_ret, op_errno,
- vector, count, buf, iobref);
- }
-
---- xlators/cluster/afr/src/afr-inode-write.c.orig 2011-08-23 14:31:39.000000000 +0200
-+++ xlators/cluster/afr/src/afr-inode-write.c 2011-10-28 06:50:34.000000000 +0200
-@@ -65,11 +65,8 @@
- }
- UNLOCK (&frame->lock);
-
- if (main_frame) {
-- local->cont.writev.prebuf.ia_ino = local->cont.writev.ino;
-- local->cont.writev.postbuf.ia_ino = local->cont.writev.ino;
--
- AFR_STACK_UNWIND (writev, main_frame,
- local->op_ret, local->op_errno,
- &local->cont.writev.prebuf,
- &local->cont.writev.postbuf);
-@@ -320,11 +317,8 @@
- }
- UNLOCK (&frame->lock);
-
- if (main_frame) {
-- local->cont.truncate.prebuf.ia_ino = local->cont.truncate.ino;
-- local->cont.truncate.postbuf.ia_ino = local->cont.truncate.ino;
--
- AFR_STACK_UNWIND (truncate, main_frame, local->op_ret,
- local->op_errno,
- &local->cont.truncate.prebuf,
- &local->cont.truncate.postbuf);
-@@ -531,11 +525,8 @@
- }
- UNLOCK (&frame->lock);
-
- if (main_frame) {
-- local->cont.ftruncate.prebuf.ia_ino = local->cont.ftruncate.ino;
-- local->cont.ftruncate.postbuf.ia_ino = local->cont.ftruncate.ino;
--
- AFR_STACK_UNWIND (ftruncate, main_frame, local->op_ret,
- local->op_errno,
- &local->cont.ftruncate.prebuf,
- &local->cont.ftruncate.postbuf);
-@@ -780,11 +771,8 @@
- }
- UNLOCK (&frame->lock);
-
- if (main_frame) {
-- local->cont.setattr.preop_buf.ia_ino = local->cont.setattr.ino;
-- local->cont.setattr.postop_buf.ia_ino = local->cont.setattr.ino;
--
- AFR_STACK_UNWIND (setattr, main_frame, local->op_ret,
- local->op_errno,
- &local->cont.setattr.preop_buf,
- &local->cont.setattr.postop_buf);
-@@ -990,13 +978,8 @@
- }
- UNLOCK (&frame->lock);
-
- if (main_frame) {
-- local->cont.fsetattr.preop_buf.ia_ino =
-- local->cont.fsetattr.ino;
-- local->cont.fsetattr.postop_buf.ia_ino =
-- local->cont.fsetattr.ino;
--
- AFR_STACK_UNWIND (fsetattr, main_frame, local->op_ret,
- local->op_errno,
- &local->cont.fsetattr.preop_buf,
- &local->cont.fsetattr.postop_buf);
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;
+