Update to 3.1.2, apply CloudFS patches.
This commit is contained in:
parent
20fea3463c
commit
d775209350
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ glusterfs-2.0.9.tar.gz
|
||||
glusterfs-3.0.5.tar.gz
|
||||
/glusterfs-3.0.7.tar.gz
|
||||
/glusterfs-3.1.1.tar.gz
|
||||
/glusterfs-3.1.2.tar.gz
|
||||
|
67
dht-fsetxattr.patch
Normal file
67
dht-fsetxattr.patch
Normal file
@ -0,0 +1,67 @@
|
||||
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
|
||||
index e204726..df0033a 100644
|
||||
--- a/xlators/cluster/dht/src/dht-common.c
|
||||
+++ b/xlators/cluster/dht/src/dht-common.c
|
||||
@@ -2068,6 +2068,50 @@ err:
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int
|
||||
+dht_fsetxattr (call_frame_t *frame, xlator_t *this,
|
||||
+ fd_t *fd, dict_t *xattr, int flags)
|
||||
+{
|
||||
+ xlator_t *subvol = NULL;
|
||||
+ dht_local_t *local = NULL;
|
||||
+ int op_errno = EINVAL;
|
||||
+
|
||||
+ VALIDATE_OR_GOTO (frame, err);
|
||||
+ VALIDATE_OR_GOTO (this, err);
|
||||
+ VALIDATE_OR_GOTO (fd, err);
|
||||
+ VALIDATE_OR_GOTO (fd->inode, err);
|
||||
+
|
||||
+ subvol = dht_subvol_get_cached (this, fd->inode);
|
||||
+ if (!subvol) {
|
||||
+ gf_log (this->name, GF_LOG_DEBUG,
|
||||
+ "no cached subvolume for fd=%p", fd);
|
||||
+ op_errno = EINVAL;
|
||||
+ goto err;
|
||||
+ }
|
||||
+
|
||||
+ local = dht_local_init (frame);
|
||||
+ if (!local) {
|
||||
+ op_errno = ENOMEM;
|
||||
+ gf_log (this->name, GF_LOG_ERROR,
|
||||
+ "Out of memory");
|
||||
+ goto err;
|
||||
+ }
|
||||
+
|
||||
+ local->inode = inode_ref (fd->inode);
|
||||
+ local->call_cnt = 1;
|
||||
+
|
||||
+ STACK_WIND (frame, dht_err_cbk, subvol, subvol->fops->fsetxattr,
|
||||
+ fd, xattr, flags);
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err:
|
||||
+ op_errno = (op_errno == -1) ? errno : op_errno;
|
||||
+ DHT_STACK_UNWIND (fsetxattr, frame, -1, op_errno);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
|
||||
int
|
||||
dht_removexattr (call_frame_t *frame, xlator_t *this,
|
||||
diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c
|
||||
index 93d01f1..3f81ba7 100644
|
||||
--- a/xlators/cluster/dht/src/dht.c
|
||||
+++ b/xlators/cluster/dht/src/dht.c
|
||||
@@ -491,6 +491,7 @@ struct xlator_fops fops = {
|
||||
.access = dht_access,
|
||||
.readlink = dht_readlink,
|
||||
.setxattr = dht_setxattr,
|
||||
+ .fsetxattr = dht_fsetxattr,
|
||||
.getxattr = dht_getxattr,
|
||||
.removexattr = dht_removexattr,
|
||||
.open = dht_open,
|
@ -1,7 +1,13 @@
|
||||
%global major_minor 3.1
|
||||
|
||||
%ifarch s390 s390x
|
||||
%global with_ib 0
|
||||
%else
|
||||
%global with_ib 1
|
||||
%endif
|
||||
|
||||
Name: glusterfs
|
||||
Version: %{major_minor}.1
|
||||
Version: %{major_minor}.2
|
||||
Release: 2%{?dist}
|
||||
Summary: Clustered file-system
|
||||
|
||||
@ -19,6 +25,15 @@ Source11: glusterfsd.init
|
||||
Source12: glusterfsd.sysconfig
|
||||
Source15: glusterfsd.logrotate
|
||||
|
||||
# bugs.gluster.com #2309 (pending)
|
||||
Patch1: wb-quota.patch
|
||||
|
||||
# bugs.gluster.com #2311 (pending)
|
||||
Patch2: dht-fsetxattr.patch
|
||||
|
||||
# CloudFS-specific
|
||||
Patch3: inode-gen.patch
|
||||
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: gcc
|
||||
@ -48,6 +63,7 @@ This package includes the glusterfs binary, the glusterfsd daemon and the
|
||||
gluster command line, libglusterfs and glusterfs translator modules common to
|
||||
both GlusterFS server and client framework.
|
||||
|
||||
%if %{with_ib}
|
||||
%package rdma
|
||||
Summary: Support for ib-verbs
|
||||
Group: Applications/File
|
||||
@ -65,6 +81,7 @@ called Translators from GNU Hurd kernel. Much of the code in GlusterFS
|
||||
is in user space and easily manageable.
|
||||
|
||||
This package provides support to ib-verbs library.
|
||||
%endif
|
||||
|
||||
%package fuse
|
||||
Summary: Fuse client
|
||||
@ -137,6 +154,9 @@ This package provides the development libraries.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
@ -154,13 +174,25 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
# We'll use our init.d
|
||||
%{__rm} -f %{buildroot}%{_sysconfdir}/init.d/glusterd
|
||||
|
||||
# Install include directory
|
||||
%{__mkdir_p} %{buildroot}%{_includedir}/glusterfs
|
||||
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterd
|
||||
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterfs
|
||||
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterfsd
|
||||
|
||||
# Install include directory
|
||||
%{__mkdir_p} %{buildroot}%{_includedir}/glusterfs
|
||||
%{__install} -p -m 0644 libglusterfs/src/*.h \
|
||||
%{buildroot}%{_includedir}/glusterfs/
|
||||
%{__install} -p -m 0644 contrib/uuid/*.h \
|
||||
%{buildroot}%{_includedir}/glusterfs/
|
||||
# Following needed by cloudfs multi-tenant translator
|
||||
%{__mkdir_p} %{buildroot}%{_includedir}/glusterfs/rpc
|
||||
%{__install} -p -m 0644 rpc/rpc-lib/src/*.h \
|
||||
%{buildroot}%{_includedir}/glusterfs/rpc/
|
||||
%{__install} -p -m 0644 rpc/xdr/src/*.h \
|
||||
%{buildroot}%{_includedir}/glusterfs/rpc/
|
||||
%{__mkdir_p} %{buildroot}%{_includedir}/glusterfs/server
|
||||
%{__install} -p -m 0644 xlators/protocol/server/src/*.h \
|
||||
%{buildroot}%{_includedir}/glusterfs/server/
|
||||
|
||||
# Remove unwanted files from all the shared libraries
|
||||
find %{buildroot}%{_libdir} -name '*.a' -delete
|
||||
@ -232,12 +264,16 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
|
||||
%{_mandir}/man8/*glusterd.8*
|
||||
%{_mandir}/man8/*glusterfs-volgen.8*
|
||||
%dir %{_localstatedir}/log/glusterfs
|
||||
%if %{with_ib}
|
||||
%exclude %{_libdir}/glusterfs/%{version}/rpc-transport/rdma*
|
||||
%endif
|
||||
%exclude %{_libdir}/glusterfs/%{version}/xlator/mount/fuse*
|
||||
|
||||
%if %{with_ib}
|
||||
%files rdma
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/glusterfs/%{version}/rpc-transport/rdma*
|
||||
%endif
|
||||
|
||||
%files fuse
|
||||
%defattr(-,root,root,-)
|
||||
@ -299,6 +335,15 @@ if [ $1 -ge 1 ]; then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Tue Feb 03 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.1.2-2
|
||||
- Add patches from CloudFS project
|
||||
|
||||
* Tue Jan 25 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.1.2-1
|
||||
- Update to 3.1.2
|
||||
|
||||
* Wed Jan 5 2011 Dan Horák <dan[at]danny.cz> - 3.1.1-3
|
||||
- no InfiniBand on s390(x)
|
||||
|
||||
* Sat Jan 1 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.1.1-2
|
||||
- Update to support readline
|
||||
- Update to not parallel build
|
||||
|
12
inode-gen.patch
Normal file
12
inode-gen.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/libglusterfs/src/inode.h b/libglusterfs/src/inode.h
|
||||
index 15a4f98..3c95407 100644
|
||||
--- a/libglusterfs/src/inode.h
|
||||
+++ b/libglusterfs/src/inode.h
|
||||
@@ -104,6 +104,7 @@ struct _inode {
|
||||
struct list_head list; /* active/lru/purge */
|
||||
|
||||
struct _inode_ctx *_ctx; /* replacement for dict_t *(inode->ctx) */
|
||||
+ uint64_t gen; /* for locking code */
|
||||
};
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
4584710adee36920c97a658b25a1446d glusterfs-3.1.1.tar.gz
|
||||
9dee75180db951cde971722f80779769 glusterfs-3.1.2.tar.gz
|
||||
|
32
wb-quota.patch
Normal file
32
wb-quota.patch
Normal file
@ -0,0 +1,32 @@
|
||||
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
|
||||
index 43956a9..d97812a 100644
|
||||
--- a/xlators/performance/write-behind/src/write-behind.c
|
||||
+++ b/xlators/performance/write-behind/src/write-behind.c
|
||||
@@ -1667,7 +1667,8 @@ __wb_get_other_requests (list_head_t *list, list_head_t *other_requests)
|
||||
int32_t
|
||||
wb_stack_unwind (list_head_t *unwinds)
|
||||
{
|
||||
- struct iatt buf = {0,};
|
||||
+ struct iatt prebuf = {0,};
|
||||
+ struct iatt postbuf = {0,};
|
||||
wb_request_t *request = NULL, *dummy = NULL;
|
||||
call_frame_t *frame = NULL;
|
||||
wb_local_t *local = NULL;
|
||||
@@ -1678,8 +1679,15 @@ wb_stack_unwind (list_head_t *unwinds)
|
||||
frame = request->stub->frame;
|
||||
local = frame->local;
|
||||
|
||||
- STACK_UNWIND (frame, local->op_ret, local->op_errno, &buf,
|
||||
- &buf);
|
||||
+ /*
|
||||
+ * There are probably a lot of other problems with returning
|
||||
+ * these bogus iatts, but this fix at least gives us enough
|
||||
+ * information for features/quota to work (sort of).
|
||||
+ */
|
||||
+ postbuf.ia_blocks = (request->write_size + 511) / 512;
|
||||
+
|
||||
+ STACK_UNWIND (frame, local->op_ret, local->op_errno,
|
||||
+ &prebuf, &postbuf);
|
||||
|
||||
ret = wb_request_unref (request);
|
||||
if (ret == 0) {
|
Loading…
Reference in New Issue
Block a user