summaryrefslogtreecommitdiff
path: root/filesystems
diff options
context:
space:
mode:
authormanu <manu>2011-10-25 09:23:37 +0000
committermanu <manu>2011-10-25 09:23:37 +0000
commit3a3b800d62f7c6e7c770bd92718c3784f8d2a5ca (patch)
tree4d86cb0425aeda2ceba410ac2b0867d64fa1e59f /filesystems
parentd8f3861becbf1b8525a92caf2fc544194f2302a4 (diff)
downloadpkgsrc-3a3b800d62f7c6e7c770bd92718c3784f8d2a5ca.tar.gz
Pull upstream patch to make inode more reliable. LOOKUP and READDIR
cans show different inodes for the same object without that fix.
Diffstat (limited to 'filesystems')
-rw-r--r--filesystems/glusterfs/Makefile4
-rw-r--r--filesystems/glusterfs/distinfo4
-rw-r--r--filesystems/glusterfs/patches/patch-br69
3 files changed, 68 insertions, 9 deletions
diff --git a/filesystems/glusterfs/Makefile b/filesystems/glusterfs/Makefile
index d66550e89b1..c69ec5e6b59 100644
--- a/filesystems/glusterfs/Makefile
+++ b/filesystems/glusterfs/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.20 2011/10/25 08:34:28 manu Exp $
+# $NetBSD: Makefile,v 1.21 2011/10/25 09:23:37 manu Exp $
#
DISTNAME= glusterfs-3.2.3
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= filesystems
MASTER_SITES= http://download.gluster.com/pub/gluster/glusterfs/3.2/3.2.3/
diff --git a/filesystems/glusterfs/distinfo b/filesystems/glusterfs/distinfo
index d18ed1eadc7..f2fda651012 100644
--- a/filesystems/glusterfs/distinfo
+++ b/filesystems/glusterfs/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.16 2011/10/25 08:34:28 manu Exp $
+$NetBSD: distinfo,v 1.17 2011/10/25 09:23:37 manu Exp $
SHA1 (glusterfs-3.2.3.tar.gz) = 7a36e496d9ac3fbf11123bb42884445334d07f06
RMD160 (glusterfs-3.2.3.tar.gz) = 89d6a5f9c1362e1fe4d88e69465311069552d319
@@ -26,7 +26,7 @@ SHA1 (patch-bn) = 98ce48be2239f42edc4ef8e26644305f6aa0a5eb
SHA1 (patch-bo) = be0dcdcc0acb6a5e54664372c34a28f1307fbd00
SHA1 (patch-bp) = 77463ea7d739d532e20dbe5bd66d58c22ba0c248
SHA1 (patch-bq) = 7a59abc6ea5966a9f99be86fe31e3507f02b932a
-SHA1 (patch-br) = e665af3542d137db7db6a186360bfe1d5564b212
+SHA1 (patch-br) = c4b315c0e05823fa9afef9d3a03b5fa4c25f515b
SHA1 (patch-bs) = d2f79ef19143f74f5a12187ea2dfd9e1ed92b726
SHA1 (patch-bt) = 58f8e5ce66e6b691dd9972bd649dc18f7d5a258a
SHA1 (patch-bu) = 006a6802958fad3950eadad456e362b7f4c2ca4a
diff --git a/filesystems/glusterfs/patches/patch-br b/filesystems/glusterfs/patches/patch-br
index a3a0da6c2ab..0aeaa678f39 100644
--- a/filesystems/glusterfs/patches/patch-br
+++ b/filesystems/glusterfs/patches/patch-br
@@ -1,4 +1,4 @@
-$NetBSD: patch-br,v 1.6 2011/10/06 02:19:06 manu Exp $
+$NetBSD: patch-br,v 1.7 2011/10/25 09:23:37 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,8 +8,11 @@ glusterfsd really wants to hardlink the symlink and not its target.
If linkat(2) is inavailable, then moving a symlink on distributed
volumes fails.
---- xlators/storage/posix/src/posix.c.orig 2011-08-23 14:31:42.000000000 +0200
-+++ xlators/storage/posix/src/posix.c 2011-09-17 15:45:30.000000000 +0200
+Also pull upstreampatch that fix inode generation so that values
+are reliable
+
+--- xlators/storage/posix/src/posix.c.orig 2011-10-25 11:01:33.000000000 +0200
++++ xlators/storage/posix/src/posix.c 2011-10-25 10:54:29.000000000 +0200
@@ -36,8 +36,12 @@
#ifndef GF_BSD_HOST_OS
#include <alloca.h>
@@ -23,7 +26,53 @@ volumes fails.
#include "md5.h"
#include "checksum.h"
#include "dict.h"
-@@ -1232,8 +1236,13 @@
+@@ -244,8 +248,23 @@
+
+ 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--) {
++ temp_ino += 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;
+
+ out:
+@@ -1232,8 +1255,13 @@
loc->path, strerror (op_errno));
goto out;
}
@@ -37,7 +86,7 @@ volumes fails.
if (op_ret == -1) {
op_errno = errno;
-@@ -2125,9 +2134,20 @@
+@@ -2125,9 +2153,20 @@
newparentpath, strerror (op_errno));
goto out;
}
@@ -58,3 +107,13 @@ volumes fails.
op_errno = errno;
gf_log (this->name, GF_LOG_ERROR,
"link %s to %s failed: %s",
+@@ -4381,8 +4420,9 @@
+ 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;
+ }
+ }
+