diff options
author | Archzfs Buildbot | 2018-09-19 21:53:05 +0000 |
---|---|---|
committer | Archzfs Buildbot | 2018-09-19 21:53:05 +0000 |
commit | 87e91f7b7b35384b7b0c0830f135edf19f6842bf (patch) | |
tree | a469db2eeb872aee1dcbf6baa57700768c893370 | |
parent | af8f941ab901f8ecd92eb32fd2e2a736053bc8a3 (diff) | |
download | aur-87e91f7b7b35384b7b0c0830f135edf19f6842bf.tar.gz |
Semi-automated update for kernel 4.18.5.arch1-1 + zfs 0.7.11
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 31 | ||||
-rw-r--r-- | upstream-ac09630-Fix-zpl_mount-deadlock.patch | 89 | ||||
-rw-r--r-- | zfs.install | 14 |
4 files changed, 21 insertions, 125 deletions
@@ -1,17 +1,17 @@ pkgbase = zfs-linux-vfio - pkgver = 0.7.9.4.17.2.1 + pkgver = 0.7.11_4.18.5.arch1.1 pkgrel = 1 url = http://zfsonlinux.org/ arch = x86_64 license = CDDL - makedepends = linux-vfio-headers=4.17.2-1 + makedepends = linux-vfio-headers=4.18.5.arch1-1 makedepends = spl-linux-vfio-headers depends = kmod depends = spl-linux-vfio - depends = zfs-utils-common=0.7.9 - depends = linux-vfio=4.17.2-1 - source = https://github.com/zfsonlinux/zfs/releases/download/zfs-0.7.9/zfs-0.7.9.tar.gz - sha256sums = f50ca2441c6abde4fe6b9f54d5583a45813031d6bb72b0011b00fc2683cd9f7a + depends = zfs-utils-common=0.7.11 + depends = linux-vfio=4.18.5.arch1-1 + source = https://github.com/zfsonlinux/zfs/releases/download/zfs-0.7.11/zfs-0.7.11.tar.gz + sha256sums = 4dff9ecce6e02061242d9435febe88c1250de83b96d392b712bccf31c459517a pkgname = zfs-linux-vfio pkgdesc = Kernel modules for the Zettabyte File System. @@ -17,29 +17,28 @@ # pkgbase="zfs-linux-vfio" pkgname=("zfs-linux-vfio" "zfs-linux-vfio-headers") +_zfsver="0.7.11" +_kernelver="4.18.5.arch1-1" +_extramodules="${_kernelver/.arch/-arch}-vfio" -pkgver=0.7.9.4.17.3.1 +pkgver="${_zfsver}_$(echo ${_kernelver} | sed s/-/./g)" pkgrel=1 -makedepends=("linux-vfio-headers=4.17.3-1" "spl-linux-vfio-headers") +makedepends=("linux-vfio-headers=${_kernelver}" "spl-linux-vfio-headers") arch=("x86_64") url="http://zfsonlinux.org/" -source=("https://github.com/zfsonlinux/zfs/releases/download/zfs-0.7.9/zfs-0.7.9.tar.gz" "upstream-ac09630-Fix-zpl_mount-deadlock.patch") -sha256sums=("f50ca2441c6abde4fe6b9f54d5583a45813031d6bb72b0011b00fc2683cd9f7a" "1799f6f7b2a60a23b66106c9470414628398f6bfc10da3d0f41c548bba6130e8") +source=("https://github.com/zfsonlinux/zfs/releases/download/zfs-${_zfsver}/zfs-${_zfsver}.tar.gz") +sha256sums=("4dff9ecce6e02061242d9435febe88c1250de83b96d392b712bccf31c459517a") license=("CDDL") -depends=("kmod" 'spl-linux-vfio' "zfs-utils-common=0.7.9" "linux-vfio=4.17.3-1") -prepare() { - cd "${srcdir}/zfs-0.7.9" - patch -Np1 -i ${srcdir}/upstream-ac09630-Fix-zpl_mount-deadlock.patch -} +depends=("kmod" 'spl-linux-vfio' "zfs-utils-common=${_zfsver}" "linux-vfio=${_kernelver}") build() { - cd "${srcdir}/zfs-0.7.9" + cd "${srcdir}/zfs-${_zfsver}" ./autogen.sh ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --libdir=/usr/lib \ --datadir=/usr/share --includedir=/usr/include --with-udevdir=/lib/udev \ - --libexecdir=/usr/lib/zfs-0.7.9 --with-config=kernel \ - --with-linux=/usr/lib/modules/4.17.3-1-vfio/build \ - --with-linux-obj=/usr/lib/modules/4.17.3-1-vfio/build + --libexecdir=/usr/lib/zfs-${zfsver} --with-config=kernel \ + --with-linux=/usr/lib/modules/${_extramodules}/build \ + --with-linux-obj=/usr/lib/modules/${_extramodules}/build make } @@ -49,7 +48,7 @@ package_zfs-linux-vfio() { provides=("zfs") groups=("archzfs-linux-vfio") conflicts=('zfs-linux-vfio-git') - cd "${srcdir}/zfs-0.7.9" + cd "${srcdir}/zfs-${_zfsver}" make DESTDIR="${pkgdir}" install cp -r "${pkgdir}"/{lib,usr} rm -r "${pkgdir}"/lib @@ -60,9 +59,9 @@ package_zfs-linux-vfio() { package_zfs-linux-vfio-headers() { pkgdesc="Kernel headers for the Zettabyte File System." conflicts=('zfs-archiso-linux-headers' 'zfs-archiso-linux-git-headers' 'zfs-linux-hardened-headers' 'zfs-linux-hardened-git-headers' 'zfs-linux-lts-headers' 'zfs-linux-lts-git-headers' 'zfs-linux-headers' 'zfs-linux-git-headers' 'zfs-linux-vfio-git-headers' 'zfs-linux-zen-headers' 'zfs-linux-zen-git-headers' ) - cd "${srcdir}/zfs-0.7.9" + cd "${srcdir}/zfs-${_zfsver}" make DESTDIR="${pkgdir}" install rm -r "${pkgdir}/lib" # Remove reference to ${srcdir} - sed -i "s+${srcdir}++" ${pkgdir}/usr/src/zfs-*/4.17.3-1-vfio/Module.symvers + sed -i "s+${srcdir}++" ${pkgdir}/usr/src/zfs-*/${_extramodules}/Module.symvers } diff --git a/upstream-ac09630-Fix-zpl_mount-deadlock.patch b/upstream-ac09630-Fix-zpl_mount-deadlock.patch deleted file mode 100644 index 082964ca5641..000000000000 --- a/upstream-ac09630-Fix-zpl_mount-deadlock.patch +++ /dev/null @@ -1,89 +0,0 @@ -From ac09630d8b0bf6c92084a30fdaefd03fd0adbdc1 Mon Sep 17 00:00:00 2001 -From: Brian Behlendorf <behlendorf1@llnl.gov> -Date: Wed, 11 Jul 2018 15:49:10 -0700 -Subject: [PATCH] Fix zpl_mount() deadlock - -Commit 93b43af10 inadvertently introduced the following scenario which -can result in a deadlock. This issue was most easily reproduced by -LXD containers using a ZFS storage backend but should be reproducible -under any workload which is frequently mounting and unmounting. - --- THREAD A -- -spa_sync() - spa_sync_upgrades() - rrw_enter(&dp->dp_config_rwlock, RW_WRITER, FTAG); <- Waiting on B - --- THREAD B -- -mount_fs() - zpl_mount() - zpl_mount_impl() - dmu_objset_hold() - dmu_objset_hold_flags() - dsl_pool_hold() - dsl_pool_config_enter() - rrw_enter(&dp->dp_config_rwlock, RW_READER, tag); - sget() - sget_userns() - grab_super() - down_write(&s->s_umount); <- Waiting on C - --- THREAD C -- -cleanup_mnt() - deactivate_super() - down_write(&s->s_umount); - deactivate_locked_super() - zpl_kill_sb() - kill_anon_super() - generic_shutdown_super() - sync_filesystem() - zpl_sync_fs() - zfs_sync() - zil_commit() - txg_wait_synced() <- Waiting on A - -Reviewed by: Alek Pinchuk <apinchuk@datto.com> -Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> -Closes #7598 -Closes #7659 -Closes #7691 -Closes #7693 ---- - include/sys/zfs_vfsops.h | 1 + - module/zfs/zpl_super.c | 11 ++++++++++- - 2 files changed, 11 insertions(+), 1 deletion(-) - -diff --git a/include/sys/zfs_vfsops.h b/include/sys/zfs_vfsops.h -index febfdff97f2..31c9c6d7f74 100644 ---- a/include/sys/zfs_vfsops.h -+++ b/include/sys/zfs_vfsops.h -@@ -32,6 +32,7 @@ - #include <sys/zil.h> - #include <sys/sa.h> - #include <sys/rrwlock.h> -+#include <sys/dsl_dataset.h> - #include <sys/zfs_ioctl.h> - - #ifdef __cplusplus -diff --git a/module/zfs/zpl_super.c b/module/zfs/zpl_super.c -index fc10271b787..5c426b0a9fb 100644 ---- a/module/zfs/zpl_super.c -+++ b/module/zfs/zpl_super.c -@@ -271,8 +271,17 @@ zpl_mount_impl(struct file_system_type *fs_type, int flags, zfs_mnt_t *zm) - if (err) - return (ERR_PTR(-err)); - -+ /* -+ * The dsl pool lock must be released prior to calling sget(). -+ * It is possible sget() may block on the lock in grab_super() -+ * while deactivate_super() holds that same lock and waits for -+ * a txg sync. If the dsl_pool lock is held over over sget() -+ * this can prevent the pool sync and cause a deadlock. -+ */ -+ dsl_pool_rele(dmu_objset_pool(os), FTAG); - s = zpl_sget(fs_type, zpl_test_super, set_anon_super, flags, os); -- dmu_objset_rele(os, FTAG); -+ dsl_dataset_rele(dmu_objset_ds(os), FTAG); -+ - if (IS_ERR(s)) - return (ERR_CAST(s)); - diff --git a/zfs.install b/zfs.install index ed9bca388bca..c2a2d7807e6d 100644 --- a/zfs.install +++ b/zfs.install @@ -1,18 +1,4 @@ -post_install() { - check_initramfs -} - post_remove() { - check_initramfs 'remove' -} - -post_upgrade() { - check_initramfs -} - -check_initramfs() { - echo ">>> Updating ZFS module dependencies" - depmod -a 4.17.3-1-vfio MK_CONF=$(grep -v '#' /etc/mkinitcpio.conf | grep zfs >/dev/null; echo $?); if [[ ${MK_CONF} == '0' && $1 == 'remove' ]]; then echo '>>> The ZFS packages have been removed, but "zfs" remains in the "hooks"' |