]> git.pld-linux.org Git - packages/zfs.git/commitdiff
- fix broken build auto/th/zfs-0.6.3-4
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 25 Jan 2015 23:49:05 +0000 (00:49 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 25 Jan 2015 23:49:05 +0000 (00:49 +0100)
linux-3.18.patch [new file with mode: 0644]
zfs.spec

diff --git a/linux-3.18.patch b/linux-3.18.patch
new file mode 100644 (file)
index 0000000..fb26f4b
--- /dev/null
@@ -0,0 +1,84 @@
+From 107077a193a5c35e83ab3ba890c429f31736d055 Mon Sep 17 00:00:00 2001
+From: Ned Bass <bass6@llnl.gov>
+Date: Thu, 16 Oct 2014 13:52:56 -0700
+Subject: [PATCH] Remove checks for mandatory locks
+
+The Linux VFS handles mandatory locks generically so we shouldn't
+need to check for conflicting locks in zfs_read(), zfs_write(), or
+zfs_freesp().  Linux 3.18 removed the lock_may_read() and
+lock_may_write() interfaces which we were relying on for this
+purpose.  Rather than emulating those interfaces we remove the
+redundant checks.
+
+Signed-off-by: Ned Bass <bass6@llnl.gov>
+Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Closes #2804
+---
+ module/zfs/zfs_vnops.c | 18 ------------------
+ module/zfs/zfs_znode.c | 10 ----------
+ 2 files changed, 28 deletions(-)
+
+diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
+index 4f53173..02fab99 100644
+--- a/module/zfs/zfs_vnops.c
++++ b/module/zfs/zfs_vnops.c
+@@ -471,15 +471,6 @@ zfs_read(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
+       }
+       /*
+-       * Check for mandatory locks
+-       */
+-      if (mandatory_lock(ip) &&
+-          !lock_may_read(ip, uio->uio_loffset, uio->uio_resid)) {
+-              ZFS_EXIT(zsb);
+-              return (SET_ERROR(EAGAIN));
+-      }
+-
+-      /*
+        * If we're in FRSYNC mode, sync out this znode before reading it.
+        */
+       if (ioflag & FRSYNC || zsb->z_os->os_sync == ZFS_SYNC_ALWAYS)
+@@ -648,15 +639,6 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
+       }
+       /*
+-       * Check for mandatory locks before calling zfs_range_lock()
+-       * in order to prevent a deadlock with locks set via fcntl().
+-       */
+-      if (mandatory_lock(ip) && !lock_may_write(ip, woff, n)) {
+-              ZFS_EXIT(zsb);
+-              return (SET_ERROR(EAGAIN));
+-      }
+-
+-      /*
+        * Pre-fault the pages to ensure slow (eg NFS) pages
+        * don't hold up txg.
+        * Skip this if uio contains loaned arc_buf.
+diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c
+index 23e0907..a7ef07c 100644
+--- a/module/zfs/zfs_znode.c
++++ b/module/zfs/zfs_znode.c
+@@ -1471,7 +1471,6 @@ zfs_trunc(znode_t *zp, uint64_t end)
+ int
+ zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
+ {
+-      struct inode *ip = ZTOI(zp);
+       dmu_tx_t *tx;
+       zfs_sb_t *zsb = ZTOZSB(zp);
+       zilog_t *zilog = zsb->z_log;
+@@ -1493,15 +1492,6 @@ zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
+                       return (error);
+       }
+-      /*
+-       * Check for any locks in the region to be freed.
+-       */
+-      if (ip->i_flock && mandatory_lock(ip)) {
+-              uint64_t length = (len ? len : zp->z_size - off);
+-              if (!lock_may_write(ip, off, length))
+-                      return (SET_ERROR(EAGAIN));
+-      }
+-
+       if (len == 0) {
+               error = zfs_trunc(zp, off);
+       } else {
index f006ccb4719bf3cdba4ba6da9857d211a40458bc..4e7eb386d12e5a2e269933da74c5cf4dae1099e2 100644 (file)
--- a/zfs.spec
+++ b/zfs.spec
@@ -42,7 +42,7 @@ exit 1
 %define                bkpkg   %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%build_kernel_pkg ; done)
 
 %define        pname   zfs
-%define        rel     3
+%define        rel     4
 Summary:       Native Linux port of the ZFS filesystem
 Summary(pl.UTF-8):     Natywny linuksowy port systemu plików ZFS
 Name:          %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
@@ -53,6 +53,7 @@ Group:                Applications/System
 Source0:       http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/%{pname}-%{version}.tar.gz
 # Source0-md5: 5bcc32c122934d421eba68e16826637d
 Patch0:                %{pname}-link.patch
+Patch1:                linux-3.18.patch
 URL:           http://zfsonlinux.org/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -234,6 +235,7 @@ p=`pwd`\
 %prep
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
This page took 0.15969 seconds and 4 git commands to generate.