Compare commits
140 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 484fdeae51 | |||
| e697cc5992 | |||
| 755c71660a | |||
| 4f457a8285 | |||
| 7764433c70 | |||
| be2dd8e629 | |||
| 5881d024a7 | |||
| fb2819a99e | |||
| a06fb96702 | |||
| f17f9da9f3 | |||
| cb19e379cd | |||
| 85fab4fe16 | |||
| 53b89f82e3 | |||
| c12e9c738d | |||
| 8af2630849 | |||
| 1cd71b3b73 | |||
| 33bcc36963 | |||
| d75312dc84 | |||
| 51204ca4f7 | |||
| 4b661efd65 | |||
| 28dd83391b | |||
| 7a7de98bf2 | |||
| 548b12af1d | |||
| 363c009381 | |||
| 6967bf4185 | |||
| c8ca652406 | |||
| 29e1ddcc26 | |||
| 00fad03966 | |||
| 59b6645a48 | |||
| 8228117e8b | |||
| 387483f555 | |||
| 224ca2e1b4 | |||
| 1f122c546d | |||
| b34f3bcce2 | |||
| 4b8605c4d7 | |||
| 9af86c74fe | |||
| 6afcaafa51 | |||
| 5548e2b0b1 | |||
| 8f4d852dcd | |||
| 01e04e2989 | |||
| fd0cc4becd | |||
| cb47b57463 | |||
| 69b48b05c5 | |||
| 3419ff852f | |||
| 1d07acad8a | |||
| 984ac2c31e | |||
| 292758bd89 | |||
| 457cad5f88 | |||
| 374aad5bea | |||
| 4a743804aa | |||
| d754cc6a74 | |||
| eebb1ff15a | |||
| 5d367893ae | |||
| e3da0bd88a | |||
| 38e2c8078f | |||
| 5bce71e23a | |||
| 4736641e76 | |||
| 9be12e4d30 | |||
| 33baf9d7be | |||
| 7bc48bd452 | |||
| 46c5edb571 | |||
| dd9acc98eb | |||
| 4d56f4c5b5 | |||
| 475af1bc20 | |||
| 4472322f60 | |||
| 9fda81f807 | |||
| 943c54360f | |||
| 99c0cd88af | |||
| a18306641a | |||
| 8f11c72175 | |||
| 45fdd1f323 | |||
| 7c8450b4b1 | |||
| 34f271eaf0 | |||
| 97bcaf4bef | |||
| 955a8beadf | |||
| 08743f90d9 | |||
| 33e3621234 | |||
| 69255727d0 | |||
| 457c4458a2 | |||
| 9cad433df9 | |||
| d1002ffe2c | |||
| f43dbfa752 | |||
| ee9e6a91e5 | |||
| a14f5e761c | |||
| 79736c677e | |||
| 7ef1f901d7 | |||
| f3e3232bf4 | |||
| 49538a61c8 | |||
| 63bd3935c7 | |||
| ae14379f41 | |||
| 13d410f1ab | |||
| 886e4c966e | |||
| 9e02600b0c | |||
| da2c3b42fa | |||
| 402acca54f | |||
| 146da5ad07 | |||
| 92886af5c5 | |||
| 512fb2e4a9 | |||
| 5b9cd1ad57 | |||
| 4114f700a9 | |||
| d551e00492 | |||
| 5dccc94923 | |||
| e4f11a69e8 | |||
| d56eab879e | |||
| 58608b5f2e | |||
| 8c9433c855 | |||
| 88b4c00190 | |||
| 696f8e69e2 | |||
| f8d2e88078 | |||
| 5e3e80687e | |||
| d968500bc7 | |||
| 5440c7266a | |||
| 00430d087a | |||
| c3ea9788ad | |||
| d8740a92c1 | |||
| 256c6c0238 | |||
| f7305de3c0 | |||
| fa456d6c4b | |||
| 3d885de40c | |||
| 4a816df53e | |||
| f3f5ce5d7f | |||
| 2a904e377e | |||
| ac43a7be1f | |||
| dee2ef0e31 | |||
| 28f635be8c | |||
| 2e2aafd11c | |||
| 4e389d452b | |||
| 3e9c7d6dff | |||
| 2249b05575 | |||
| 002d5f1b8c | |||
| 65a9766fa0 | |||
| 04a710dd91 | |||
| 2e5067b011 | |||
| 851f368539 | |||
| 1c36de4a98 | |||
| b6c5bd4c51 | |||
| 1bb9f57dcf | |||
| ff03aa2dfd | |||
| f587002c09 | |||
| ad41a6994b |
+3
-6
@@ -1,6 +1,3 @@
|
||||
[submodule "zfs-debian"]
|
||||
path = zfs-debian
|
||||
url = ../mirror_zfs-debian
|
||||
[submodule "spl-debian"]
|
||||
path = spl-debian
|
||||
url = ../mirror_spl-debian
|
||||
[submodule "zfs/upstream"]
|
||||
path = upstream
|
||||
url = ../mirror_zfs
|
||||
|
||||
@@ -1,38 +1,46 @@
|
||||
RELEASE=5.1
|
||||
|
||||
# source form https://github.com/zfsonlinux/
|
||||
|
||||
ZFSVER=0.7.11
|
||||
ZFSPKGREL=pve1~bpo1
|
||||
SPLPKGREL=pve1~bpo1
|
||||
ZFSPKGVER=${ZFSVER}-${ZFSPKGREL}
|
||||
SPLPKGVER=${ZFSVER}-${SPLPKGREL}
|
||||
ZFSPKG=debian
|
||||
ZFSVER != dpkg-parsechangelog -l ${ZFSPKG}/changelog -Sversion | cut -d- -f1
|
||||
ZFSPKGVER != dpkg-parsechangelog -l ${ZFSPKG}/changelog -Sversion
|
||||
ZFSDIR=zfs-linux_${ZFSVER}
|
||||
ZFSSRC=upstream
|
||||
|
||||
SPLDIR=spl-build
|
||||
SPLSRC=spl-debian
|
||||
ZFSDIR=zfs-build
|
||||
ZFSSRC=zfs-debian
|
||||
ZFS_DEB1= libnvpair3linux_${ZFSPKGVER}_amd64.deb
|
||||
|
||||
SPL_DEB = \
|
||||
spl_${SPLPKGVER}_amd64.deb
|
||||
ZFS_DEB_BINARY = \
|
||||
libpam-zfs_${ZFSPKGVER}_amd64.deb \
|
||||
libuutil3linux_${ZFSPKGVER}_amd64.deb \
|
||||
libzfs4linux_${ZFSPKGVER}_amd64.deb \
|
||||
libzfsbootenv1linux_${ZFSPKGVER}_amd64.deb \
|
||||
libzpool4linux_${ZFSPKGVER}_amd64.deb \
|
||||
zfs-test_${ZFSPKGVER}_amd64.deb \
|
||||
zfsutils-linux_${ZFSPKGVER}_amd64.deb \
|
||||
zfs-zed_${ZFSPKGVER}_amd64.deb
|
||||
|
||||
ZFS_DEB1= libnvpair1linux_${ZFSPKGVER}_amd64.deb
|
||||
ZFS_DEB2= \
|
||||
libuutil1linux_${ZFSPKGVER}_amd64.deb \
|
||||
libzfs2linux_${ZFSPKGVER}_amd64.deb \
|
||||
ZFS_DBG_DEBS = $(patsubst %_${ZFSPKGVER}_amd64.deb, %-dbgsym_${ZFSPKGVER}_amd64.deb, ${ZFS_DEB1} ${ZFS_DEB_BINARY})
|
||||
|
||||
ZFS_DEB2= ${ZFS_DEB_BINARY} \
|
||||
libzfslinux-dev_${ZFSPKGVER}_amd64.deb \
|
||||
libzpool2linux_${ZFSPKGVER}_amd64.deb \
|
||||
zfs-dbg_${ZFSPKGVER}_amd64.deb \
|
||||
zfs-zed_${ZFSPKGVER}_amd64.deb \
|
||||
zfs-initramfs_${ZFSPKGVER}_all.deb \
|
||||
zfs-test_${ZFSPKGVER}_amd64.deb \
|
||||
zfsutils-linux_${ZFSPKGVER}_amd64.deb
|
||||
ZFS_DEBS= $(ZFS_DEB1) $(ZFS_DEB2)
|
||||
python3-pyzfs_${ZFSPKGVER}_amd64.deb \
|
||||
pyzfs-doc_${ZFSPKGVER}_all.deb \
|
||||
spl_${ZFSPKGVER}_all.deb \
|
||||
zfs-initramfs_${ZFSPKGVER}_all.deb
|
||||
ZFS_DEBS= ${ZFS_DEB1} ${ZFS_DEB2} ${ZFS_DBG_DEBS}
|
||||
|
||||
DEBS=${SPL_DEB} ${ZFS_DEBS}
|
||||
ZFS_DSC = zfs-linux_${ZFSPKGVER}.dsc
|
||||
|
||||
all: deb
|
||||
deb: ${DEBS}
|
||||
.PHONY: deb
|
||||
deb: ${ZFS_DEBS}
|
||||
.PHONY: dsc
|
||||
dsc: ${ZFS_DSC}
|
||||
|
||||
# called from pve-kernel's Makefile to get patched sources
|
||||
.PHONY: kernel
|
||||
kernel: dsc
|
||||
dpkg-source -x ${ZFS_DSC} ../pkg-zfs
|
||||
${MAKE} -C ../pkg-zfs -f debian/rules adapt_meta_file
|
||||
|
||||
.PHONY: dinstall
|
||||
dinstall: ${DEBS}
|
||||
@@ -40,44 +48,35 @@ dinstall: ${DEBS}
|
||||
|
||||
.PHONY: submodule
|
||||
submodule:
|
||||
test -f "${ZFSSRC}/debian/changelog" || git submodule update --init
|
||||
test -f "${SPLSRC}/debian/changelog" || git submodule update --init
|
||||
|
||||
.PHONY: spl
|
||||
spl: ${SPL_DEB}
|
||||
${SPL_DEB}: ${SPLSRC}
|
||||
rm -rf ${SPLDIR}
|
||||
mkdir ${SPLDIR}
|
||||
cp -a ${SPLSRC}/* ${SPLDIR}/
|
||||
mv ${SPLDIR}/debian/changelog ${SPLDIR}/debian/changelog.org
|
||||
cat spl-changelog.Debian ${SPLDIR}/debian/changelog.org > ${SPLDIR}/debian/changelog
|
||||
cd ${SPLDIR}; ln -s ../spl-patches patches
|
||||
cd ${SPLDIR}; quilt push -a
|
||||
cd ${SPLDIR}; rm -rf .pc ./patches
|
||||
cd ${SPLDIR}; dpkg-buildpackage -b -uc -us
|
||||
test -f "${ZFSSRC}/README.md" || git submodule update --init
|
||||
${ZFSSRC}/README.md: submodule
|
||||
|
||||
.PHONY: zfs
|
||||
zfs: $(ZFS_DEBS)
|
||||
$(ZFS_DEB2): $(ZFS_DEB1)
|
||||
$(ZFS_DEB1): $(ZFSSRC)
|
||||
rm -rf ${ZFSDIR}
|
||||
mkdir ${ZFSDIR}
|
||||
cp -a ${ZFSSRC}/* ${ZFSDIR}/
|
||||
mv ${ZFSDIR}/debian/changelog ${ZFSDIR}/debian/changelog.org
|
||||
cat zfs-changelog.Debian ${ZFSDIR}/debian/changelog.org > ${ZFSDIR}/debian/changelog
|
||||
cd ${ZFSDIR}; ln -s ../zfs-patches patches
|
||||
cd ${ZFSDIR}; quilt push -a
|
||||
cd ${ZFSDIR}; rm -rf .pc ./patches
|
||||
zfs: ${ZFS_DEBS}
|
||||
${ZFS_DEB2}: ${ZFS_DEB1}
|
||||
${ZFS_DEB1}: ${ZFSDIR}
|
||||
cd ${ZFSDIR}; dpkg-buildpackage -b -uc -us
|
||||
lintian ${ZFS_DEBS}
|
||||
|
||||
${ZFS_DSC}: ${ZFSDIR}
|
||||
tar czf zfs-linux_${ZFSVER}.orig.tar.gz ${ZFSDIR}
|
||||
cd ${ZFSDIR}; dpkg-buildpackage -S -uc -us -d
|
||||
lintian $@
|
||||
|
||||
${ZFSDIR}: ${ZFSSRC}/README.md ${ZFSSRC} ${ZFSPKG}
|
||||
rm -rf ${ZFSDIR} ${ZFSDIR}.tmp
|
||||
cp -a ${ZFSSRC} ${ZFSDIR}.tmp
|
||||
cp -a ${ZFSPKG} ${ZFSDIR}.tmp/debian
|
||||
mv ${ZFSDIR}.tmp ${ZFSDIR}
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *~ *.deb *.changes *.buildinfo ${ZFSDIR} ${SPLDIR}
|
||||
rm -rf *~ *.deb *.changes *.buildinfo *.dsc *.orig.tar.* *.debian.tar.* ${ZFSDIR}
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
|
||||
|
||||
.PHONY: upload
|
||||
upload: ${DEBS}
|
||||
tar -cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch --arch amd64
|
||||
tar -cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist bullseye --arch amd64
|
||||
|
||||
@@ -2,8 +2,8 @@ Proxmox VE packaging for ZFS on Linux
|
||||
|
||||
This is based on code from:
|
||||
|
||||
https://github.com/zfsonlinux/pkg-spl.git
|
||||
https://github.com/zfsonlinux/pkg-zfs.git
|
||||
https://salsa.debian.org/zfsonlinux-team/zfs
|
||||
https://salsa.debian.org/zfsonlinux-team/spl
|
||||
|
||||
We removed the dkms/modules related code, because we ship the
|
||||
modules with the kernel.
|
||||
|
||||
Vendored
+818
@@ -0,0 +1,818 @@
|
||||
zfs-linux (2.0.6-pve1) bullseye; urgency=medium
|
||||
|
||||
* update ZFS to 2.0.6
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 28 Sep 2021 07:36:23 +0200
|
||||
|
||||
zfs-linux (2.0.5-pve1) bullseye; urgency=medium
|
||||
|
||||
* update ZFS to 2.0.5
|
||||
|
||||
* do not restart most services upon upgrade
|
||||
|
||||
* add a script and cronjob for regular trimming of pools
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 09 Jul 2021 18:23:58 +0200
|
||||
|
||||
zfs-linux (2.0.4-pve1) pve pmg; urgency=medium
|
||||
|
||||
* update ZFS to 2.0.4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 18 Mar 2021 13:31:18 +0100
|
||||
|
||||
zfs-linux (2.0.3-pve2) pve pmg; urgency=medium
|
||||
|
||||
* match package names to the ones used by Debian
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 25 Feb 2021 13:06:07 +0100
|
||||
|
||||
zfs-linux (2.0.3-pve1) pve pmg; urgency=medium
|
||||
|
||||
* buildsys: make libpam-zfs a separate package
|
||||
|
||||
* update ZFS to 2.0.3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 15 Feb 2021 15:46:03 +0100
|
||||
|
||||
zfs-linux (2.0.2-pve1) pve pmg; urgency=medium
|
||||
|
||||
* update ZFS to 2.0.2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 06 Feb 2021 10:23:03 +0100
|
||||
|
||||
zfs-linux (2.0.1-pve1) pve pmg; urgency=medium
|
||||
|
||||
* update ZFS to 2.0.1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 13 Jan 2021 14:16:02 +0100
|
||||
|
||||
zfs-linux (0.8.5-pve1) pve pmg; urgency=medium
|
||||
|
||||
* update ZFS to 0.8.5
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 08 Oct 2020 10:45:28 +0200
|
||||
|
||||
zfs-linux (0.8.4-pve2) pve pmg; urgency=medium
|
||||
|
||||
* add systemd-unit for importing specific pools
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 29 Sep 2020 05:31:35 +0200
|
||||
|
||||
zfs-linux (0.8.4-pve1) pve pmg; urgency=medium
|
||||
|
||||
* update ZFS to 0.8.4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 14 May 2020 10:39:11 +0200
|
||||
|
||||
zfs-linux (0.8.3-pve1) pve pmg; urgency=medium
|
||||
|
||||
* update ZFS to 0.8.3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 24 Jan 2020 09:10:41 +0100
|
||||
|
||||
zfs-linux (0.8.2-pve2) pve pmg; urgency=medium
|
||||
|
||||
* save and restore the FPU state using ZFS dedicated per-cpu FPU state
|
||||
variables.
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 23 Oct 2019 17:14:22 +0200
|
||||
|
||||
zfs-linux (0.8.2-pve1) pve pmg; urgency=medium
|
||||
|
||||
* update to new 0.8.2 upstream stable release
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 28 Sep 2019 08:34:53 +0200
|
||||
|
||||
zfs-linux (0.8.1-pve3) pve pmg; urgency=medium
|
||||
|
||||
* [SIMD]: FPU register save/restore is also required on 5.0 kernel.
|
||||
strict kernel module release, user space tooling is not touched
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 27 Sep 2019 14:37:32 +0200
|
||||
|
||||
zfs-linux (0.8.1-pve2) pve pmg; urgency=medium
|
||||
|
||||
* cherry-pick parallel mount fix
|
||||
|
||||
* cherry-pick SIMD compat patches
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 20 Aug 2019 17:10:11 +0200
|
||||
|
||||
zfs-linux (0.8.1-pve1) pve pmg; urgency=medium
|
||||
|
||||
* update ZFS to 0.8.1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 14 Jun 2019 20:43:10 +0200
|
||||
|
||||
zfs-linux (0.8.0-pve1) pve pmg; urgency=medium
|
||||
|
||||
* update ZFS to 0.8.0
|
||||
|
||||
* SPL is now included in upstream ZFS packaging.
|
||||
Build dummy spl and spl-dkms packages to ease transition on upgrades.
|
||||
|
||||
* Build pyzfs+documentation package
|
||||
|
||||
* Use arc_summary3.py to provide arc_summary.
|
||||
|
||||
* shipped python scripts now use python3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 24 May 2019 12:05:22 +0200
|
||||
|
||||
zfs-linux (0.7.13-pve2~bpo2) pve pmg; urgency=medium
|
||||
|
||||
* rebuild for PVE 6.0 / Debian Buster
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 21 May 2019 20:08:45 +0200
|
||||
|
||||
zfs-linux (0.7.13-pve1~bpo2) unstable; urgency=medium
|
||||
|
||||
* remove conflict with insserv (<< 1.18)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 27 Mar 2019 09:56:15 +0100
|
||||
|
||||
zfs-linux (0.7.13-pve1~bpo1) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.13
|
||||
|
||||
* base zfs-linux on upstream ZOL instead of debian
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 08 Mar 2019 06:53:00 +0100
|
||||
|
||||
zfs-linux (0.7.12-pve1~bpo1) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.12
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 14 Nov 2018 17:51:59 +0100
|
||||
|
||||
zfs-linux (0.7.11-pve2~bpo1) unstable; urgency=medium
|
||||
|
||||
* update ZFS to debian/0.7.11-3
|
||||
|
||||
* Cherry-pick two fixes planned for 0.7.12
|
||||
|
||||
* Backport deadlock fix between mm_sem and tx assign in zfs_write() and page
|
||||
fault
|
||||
|
||||
* Fix missing Breaks/Replaces in zfs-initramfs
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 29 Oct 2018 13:45:49 +0100
|
||||
|
||||
zfs-linux (0.7.11-pve1~bpo1) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.11
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 10 Sep 2018 15:47:31 +0200
|
||||
|
||||
zfs-linux (0.7.9-pve3~bpo9) unstable; urgency=medium
|
||||
|
||||
* Cherry-pick fix for deadlock umount/snapentry_expire
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 03 Aug 2018 11:41:11 +0200
|
||||
|
||||
zfs-linux (0.7.9-pve2~bpo9) unstable; urgency=medium
|
||||
|
||||
* Cherry-pick fix for zpl_mount deadlock
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 12 Jul 2018 12:37:50 +0200
|
||||
|
||||
zfs-linux (0.7.9-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.9
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 18 May 2018 13:49:09 +0200
|
||||
|
||||
zfs-linux (0.7.8-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.8 (no changes)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 30 Apr 2018 13:47:22 +0200
|
||||
|
||||
zfs-linux (0.7.7-pve2~bpo9) unstable; urgency=medium
|
||||
|
||||
* (temporarily) revert likely cause of #7401
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 9 Apr 2018 09:49:27 +0200
|
||||
|
||||
zfs-linux (0.7.7-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.7
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 3 Apr 2018 14:28:35 +0200
|
||||
|
||||
zfs-linux (0.7.6-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.6
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 21 Feb 2018 09:48:29 +0100
|
||||
|
||||
zfs-linux (0.7.4-pve2~bpo9) unstable; urgency=medium
|
||||
|
||||
* cherry-pick ARC hit rate fix from 0.7.6
|
||||
|
||||
* always load ZFS modules on boot
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 19 Jan 2018 11:31:14 +0100
|
||||
|
||||
zfs-linux (0.7.4-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 19 Dec 2017 12:52:42 +0100
|
||||
|
||||
zfs-linux (0.7.3-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.3
|
||||
|
||||
* include fix for user namespace setgid issue (#6800 upstream)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 6 Nov 2017 09:14:19 +0100
|
||||
|
||||
zfs-linux (0.7.2-pve1~bpo90) unstable; urgency=medium
|
||||
|
||||
* update zfs to 0.7.2
|
||||
|
||||
* add PR 6616 - zfs send/recv compatibility with 0.6.5
|
||||
|
||||
* add PR 6695 - zfs recv: don't skip over objects which should be freed
|
||||
|
||||
* various small fixes
|
||||
|
||||
* split test suite into zfs-test package
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 12 Oct 2017 13:34:05 +0200
|
||||
|
||||
zfs-linux (0.6.5.11-pve18~bpo90) unstable; urgency=medium
|
||||
|
||||
* fix #1509: arc_summary error with L2ARC
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 2 Oct 2017 09:30:41 +0200
|
||||
|
||||
zfs-linux (0.6.5.11-pve17~bpo90) unstable; urgency=medium
|
||||
|
||||
* update zfs to debian/0.6.5.11-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 27 Jul 2017 13:11:45 +0200
|
||||
|
||||
zfs-linux (0.6.5.9-pve16~bpo90) unstable; urgency=medium
|
||||
|
||||
* drop transitional packages
|
||||
|
||||
* convert python scripts to python 3, drop .py suffix
|
||||
|
||||
* rebuild for PVE 5.0 / Debian Stretch
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 10 Mar 2017 09:45:52 +0100
|
||||
|
||||
zfs-linux (0.6.5.9-pve15~bpo80) unstable; urgency=medium
|
||||
|
||||
* update zfs to debian/0.6.5.9-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 6 Feb 2017 12:39:10 +0100
|
||||
|
||||
zfs-linux (0.6.5.8-pve14~bpo80) unstable; urgency=medium
|
||||
|
||||
* update zfs to debian/0.6.5.8-3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 11 Jan 2017 09:34:58 +0100
|
||||
|
||||
zfs-linux (0.6.5.8-pve13~bpo80) unstable; urgency=medium
|
||||
|
||||
* fix #1184: zfs-share.service has wrong path to 'rm' command
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 27 Oct 2016 11:25:47 +0200
|
||||
|
||||
zfs-linux (0.6.5.8-pve12~bpo80) unstable; urgency=medium
|
||||
|
||||
* import with "-d /dev/disk/by-id" in systemd service
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 24 Oct 2016 13:48:08 +0200
|
||||
|
||||
zfs-linux (0.6.5.8-pve11~bpo80) unstable; urgency=medium
|
||||
|
||||
* update zfs to debian/0.6.5.8-1
|
||||
|
||||
* switch package upstream sources to Debian (Jessie)
|
||||
|
||||
* add transitional packages for upgrades
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 12 Oct 2016 11:16:02 +0200
|
||||
|
||||
zfs-linux (0.6.5.7-pve10~bpo80) unstable; urgency=medium
|
||||
|
||||
* update to pkg-zfs jessie/0.6.5.7-8
|
||||
|
||||
* change package versioning to allow upgrades from PVE3/wheezy
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 28 Jun 2016 09:50:00 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve9~jessie) unstable; urgency=medium
|
||||
|
||||
* Update to pkg-zfs jessie/0.6.5.6-3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 12 Apr 2016 09:51:35 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve8~jessie) unstable; urgency=medium
|
||||
|
||||
* update to zfs-0.6.5.6
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 30 Mar 2016 10:50:22 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve7~jessie) unstable; urgency=medium
|
||||
|
||||
* update to zfs-0.6.5.4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 14 Jan 2016 10:51:17 +0100
|
||||
|
||||
zfs-linux (0.6.5-pve6~jessie) unstable; urgency=medium
|
||||
|
||||
* Prepare to tag zfs-0.6.5.3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 05 Nov 2015 07:21:44 +0100
|
||||
|
||||
zfs-linux (0.6.5-pve5~jessie) unstable; urgency=medium
|
||||
|
||||
* Illumos 6267 - dn_bonus evicted too early
|
||||
|
||||
* Fix use-after-free in vdev_disk_physio_completion
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 04 Nov 2015 17:42:42 +0100
|
||||
|
||||
zfs-linux (0.6.5-pve4~jessie) unstable; urgency=medium
|
||||
|
||||
* update to master/debian/jessie/0.6.5.2-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 05 Oct 2015 17:56:45 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve3~jessie) unstable; urgency=medium
|
||||
|
||||
* do not install /etc/init.d/zfs-zed script to avoid double startup
|
||||
with systemd
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 28 Sep 2015 10:14:40 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve2~jessie) unstable; urgency=medium
|
||||
|
||||
* update to master/debian/jessie/0.6.5.1-4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 24 Sep 2015 12:45:33 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve1~jessie) unstable; urgency=medium
|
||||
|
||||
* update to master/debian/jessie/0.6.5.1-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 21 Sep 2015 10:02:41 +0200
|
||||
|
||||
zfs-linux (0.6.4-pve3~jessie) unstable; urgency=medium
|
||||
|
||||
* update to snapshot/debian/jessie/0.6.4-24-6bec43
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 24 Aug 2015 06:13:44 +0200
|
||||
|
||||
zfs-linux (0.6.4-pve2~jessie) unstable; urgency=medium
|
||||
|
||||
* update to 0.6.4.2 (snapshot/debian/jessie/0.6.4-21-53b1d9)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 21 Jul 2015 11:03:21 +0200
|
||||
|
||||
zfs-linux (0.6.4-pve1~jessie) unstable; urgency=medium
|
||||
|
||||
* update to 0.6.4 (use upstream zol package definitions)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 14 Apr 2015 10:19:22 +0200
|
||||
|
||||
zfs-linux (0.6.3-pve3~jessie) unstable; urgency=medium
|
||||
|
||||
* ignore zfs-import-scan errors
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 31 Mar 2015 17:52:40 +0200
|
||||
|
||||
zfs-linux (0.6.3-pve2~jessie) unstable; urgency=medium
|
||||
|
||||
* use systemd for service startup
|
||||
|
||||
* install zed configuration file /etc/zfs/zed.d/zed.rc
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sun, 15 Mar 2015 15:52:54 +0100
|
||||
|
||||
zfs-linux (0.6.3-pve1~jessie) unstable; urgency=medium
|
||||
|
||||
* recompile on jessie
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 28 Feb 2015 16:02:08 +0100
|
||||
|
||||
zfs-linux (0.6.3-2~wheezy) unstable; urgency=low
|
||||
|
||||
* use /sbin/modprobe to avoid warning inside initrd
|
||||
|
||||
* fix warning about undefined values inside initrd
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 14 Jan 2015 19:03:04 +0100
|
||||
|
||||
zfs-linux (0.6.3-1~wheezy) unstable; urgency=low
|
||||
|
||||
* first version for Proxmox VE
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 10 Jan 2015 14:06:34 +0100
|
||||
|
||||
zfs-linux (0.7.12-2) unstable; urgency=medium
|
||||
|
||||
[ Colin Ian King ]
|
||||
* Only run autopkgtests for amd64, arm64, ppc64el and s390x (LP#1805627).
|
||||
|
||||
[ Martin Bagge / brother ]
|
||||
* [INTL:sv] Swedish strings for zfs-linux debconf (Closes: #918020)
|
||||
|
||||
[ Anders Jonsson ]
|
||||
* sv.po: typo fix
|
||||
|
||||
[ Mo Zhou ]
|
||||
* Change init script's behaviour to default during postinst.
|
||||
* Add ${perl:Depends} to zfs-dkms's Depends.
|
||||
* Add autopkgtest script to test zfs-dkms build.
|
||||
* autopkgtest: minor fix
|
||||
|
||||
[ Aron Xu ]
|
||||
* Add XS-Autobuild: yes to d/control
|
||||
* Conflicts with insserv << 1.18 (Closes: #915831)
|
||||
|
||||
-- Aron Xu <aron@debian.org> Fri, 11 Jan 2019 21:32:06 +0800
|
||||
|
||||
zfs-linux (0.7.12-1) unstable; urgency=medium
|
||||
|
||||
[ Stoiko Ivanov ]
|
||||
* Add Breaks/Replaces to zfs-initramfs
|
||||
|
||||
[ Mo Zhou ]
|
||||
* New upstream version 0.7.12
|
||||
* Drop unnecessary patch init-start-stop-dep-on-local-fs.patch .
|
||||
* Override init.d-script-missing-dependency-on-local_fs for zfs-zed.
|
||||
* Bump linux compatibility to 4.19 .
|
||||
|
||||
-- Mo Zhou <cdluminate@gmail.com> Mon, 19 Nov 2018 11:32:44 +0000
|
||||
|
||||
zfs-linux (0.7.11-3) unstable; urgency=medium
|
||||
|
||||
[ Antonio Russo ]
|
||||
+ https://salsa.debian.org/zfsonlinux-team/zfs/merge_requests/9
|
||||
* Break/Replace upstream .deb packages (Closes: #839921)
|
||||
* Install upstream bash completion file instead of embedded one.
|
||||
* Modify META before autoreconf.
|
||||
* Make dkms distdir before build to avoid including build artifacts.
|
||||
* Remove ZFS_AC_PACKAGE macros from DKMS sources.
|
||||
This removes dpkg-dev dependency from zfs-dkms package.
|
||||
* Use upstream's dkms.mkconf script to produce dkms.conf .
|
||||
* Ship initramfs zdev hook in zfs-initramfs (Closes: #902052)
|
||||
|
||||
[ Nicolas Braud-Santoni ]
|
||||
* Update debian/copyright, removing unused wildcards.
|
||||
|
||||
[ Nicholas D Steeves ]
|
||||
* Change -dbg package's priority from extra to optional.
|
||||
|
||||
[ Mo Zhou ]
|
||||
* Fix FTBFS on architecture=all due to FileNotFound. (Closes: #911937)
|
||||
* Add isolation-machine restriction to autopkgtest because the tests
|
||||
needs to interact with the kernel, i.e. loading kernel module.
|
||||
|
||||
-- Mo Zhou <cdluminate@gmail.com> Sun, 28 Oct 2018 10:28:52 +0000
|
||||
|
||||
zfs-linux (0.7.11-2) unstable; urgency=medium
|
||||
|
||||
* Support Devuan in dkms script. (Closes: #900089)
|
||||
Thanks to Chris Dos <chris@chrisdos.com>
|
||||
* Install init scripts to support non-systemd setups. (Closes: #826994)
|
||||
Thanks to Chris Dos <chris@chrisdos.com>
|
||||
* Override init.d-script-does-not-source-init-functions for
|
||||
zfsutils-linux and zfs-zed.
|
||||
* Patch upstream init scripts to make them work for Debian+OpenRC setup.
|
||||
* Patch upstream init script to fix missing dependency on local_fs.
|
||||
|
||||
-- Mo Zhou <cdluminate@gmail.com> Fri, 26 Oct 2018 09:32:06 +0000
|
||||
|
||||
zfs-linux (0.7.11-1) unstable; urgency=medium
|
||||
|
||||
[ Aron Xu ]
|
||||
* Add dpkg-dev to Depends of zfs-dkms (Closes: #900714)
|
||||
|
||||
[ Nicolas Braud-Santoni ]
|
||||
* Use canonical HTTPS format URL for Vcs-Git (Closes: #895873)
|
||||
|
||||
[ Mo Zhou ]
|
||||
* New upstream version 0.7.11 (Closes: #908290)
|
||||
* Bump linux_compat to 4.18 .
|
||||
* Replace get_next.sh with one-liner awk script in rules.
|
||||
* Append myself to Uploaders and refresh auto-generated control.
|
||||
* Use HTTPS format URI in watch file.
|
||||
* Recommends linux-libc-dev (<< LINUX_NEXT~) instead of (<< LINUX_NEXT).
|
||||
|
||||
-- Mo Zhou <cdluminate@gmail.com> Wed, 19 Sep 2018 08:45:18 +0000
|
||||
|
||||
zfs-linux (0.7.9-3) unstable; urgency=medium
|
||||
|
||||
[ Antonio Russo ]
|
||||
* Expand zfs-test and add Breaks/Conflicts (Closes: #899047)
|
||||
|
||||
[ Aron Xu ]
|
||||
* d/control: migrate to alioth-lists (Closes: #899756)
|
||||
|
||||
-- Aron Xu <aron@debian.org> Mon, 28 May 2018 18:22:02 +0800
|
||||
|
||||
zfs-linux (0.7.9-2) unstable; urgency=medium
|
||||
|
||||
[ Aron Xu ]
|
||||
* Move more zfs test tools to zfs-test package (Closes: #868653)
|
||||
* New upstream version 0.7.9
|
||||
* d/rules: add --enable-systemd
|
||||
* Fix lintian obsolete-relation-form-in-source
|
||||
* Bump supported linux version to 4.16
|
||||
|
||||
[ Antonio Russo ]
|
||||
* Install enum-extract.pl with dkms
|
||||
* Handle /proc/kallsym obfuscation (Closes: #891936)
|
||||
|
||||
-- Aron Xu <aron@debian.org> Thu, 17 May 2018 23:47:29 +0800
|
||||
|
||||
zfs-linux (0.7.6-1) unstable; urgency=medium
|
||||
|
||||
[ Lev Lamberov ]
|
||||
* [INTL:ru] Updated Russian translation of debconf (Closes: #885990)
|
||||
|
||||
[ Aron Xu]
|
||||
* New upstream release (Closes: #889795, #890576)
|
||||
* 0001-Fix-bug-in-distclean-which-removes-needed-files.patch:
|
||||
removed, applied upstream
|
||||
* Update VCS-* URL to salsa.debian.org
|
||||
* Apply wrap-and-sort
|
||||
* Recommends: linux-libc-dev (< ${LINUX_NEXT}):
|
||||
Tries to prevent unexpected upgrades of kernel that is not known to
|
||||
be supported by the packaged version of ZFS/SPL. (Closes: #849420)
|
||||
|
||||
-- Aron Xu <aron@debian.org> Mon, 26 Feb 2018 16:32:29 +0800
|
||||
|
||||
zfs-linux (0.7.5-1) unstable; urgency=medium
|
||||
|
||||
[ Aron Xu ]
|
||||
* New upstream version 0.7.5 (Closes: #884812)
|
||||
|
||||
[ Antonio Russo ]
|
||||
* Add version dependency on zfsutils-linux package (Closes: #880889)
|
||||
|
||||
-- Aron Xu <aron@debian.org> Fri, 19 Jan 2018 15:39:23 +0800
|
||||
|
||||
zfs-linux (0.7.4-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version 0.7.4 (Closes: #884287, #883832)
|
||||
* Require debhelper >= 10.2
|
||||
* cherry-pick: fix distclean which removes needed files (Closes: #884706)
|
||||
* Refresh patches
|
||||
* Update stdver to 4.1.2, no change required
|
||||
* Install zfs-import.target
|
||||
|
||||
-- Aron Xu <aron@debian.org> Mon, 18 Dec 2017 22:48:59 +0800
|
||||
|
||||
zfs-linux (0.7.3-3) unstable; urgency=medium
|
||||
|
||||
[ Antonio Russo ]
|
||||
* Add maximum version dependency on spl-dkms (Closes: #883008)
|
||||
|
||||
-- Aron Xu <aron@debian.org> Thu, 30 Nov 2017 00:34:30 +0800
|
||||
|
||||
zfs-linux (0.7.3-2) unstable; urgency=medium
|
||||
|
||||
[ Fabian Grünbichler ]
|
||||
* d/rules: remove obsolete calls to dpkg-architecture (Closes: #882209)
|
||||
* zfs-test: add proper Breaks+Replaces (Closes: #880902)
|
||||
* build: add implicit version to dh_makeshlibs (Closes: #880709)
|
||||
|
||||
[ Aron Xu ]
|
||||
* Depend on matching version of spl-dkms (Closes: ##881013)
|
||||
|
||||
-- Aron Xu <aron@debian.org> Tue, 28 Nov 2017 16:16:34 +0800
|
||||
|
||||
zfs-linux (0.7.3-1) unstable; urgency=medium
|
||||
|
||||
[ Antonio Russo ]
|
||||
* Refresh manual builds DKMS prevention patch
|
||||
|
||||
[ Fabian Grünbichler ]
|
||||
* zfs-test package
|
||||
* add files to debian/not-installed
|
||||
* dh_install: switch to --fail-missing
|
||||
* add new files from 0.7 to install
|
||||
* dkms: build icp module as well
|
||||
|
||||
[ Antonio Russo ]
|
||||
* dracut: make module-setup.sh shebang explicit
|
||||
* add man page reference to systemd units
|
||||
* Fix install path of zpool.d scripts
|
||||
* Incorporate DebianPT.org Portuguese translation
|
||||
* Fix typo in debconf templates
|
||||
* Drop dependency on dh-systemd
|
||||
|
||||
[ Aron Xu ]
|
||||
* Drop merged patches, update remainders
|
||||
* Update std-ver to 4.1.1
|
||||
* New upstream version 0.7.3
|
||||
* Update debconf pot file
|
||||
* Update control.in for dh-systemd deprecation
|
||||
* Add lintian override for zfs-test
|
||||
|
||||
[ Colin King ]
|
||||
* Improve cloning performance for large numbers of clones (LP: #1567557)
|
||||
Bump zcmd buffer from 16K to 256K.
|
||||
|
||||
-- Aron Xu <aron@debian.org> Tue, 31 Oct 2017 18:52:01 +0800
|
||||
|
||||
zfs-linux (0.6.5.11-1) unstable; urgency=medium
|
||||
|
||||
[ Aron Xu ]
|
||||
* Imported Upstream version 0.6.5.11
|
||||
|
||||
[ Fabian Grünbichler ]
|
||||
* fix rm path in zfs-share.service
|
||||
|
||||
-- Aron Xu <aron@debian.org> Fri, 14 Jul 2017 16:33:23 +0800
|
||||
|
||||
zfs-linux (0.6.5.10-1) unstable; urgency=medium
|
||||
|
||||
* Add kernel version to depmod cmd (Closes: #860958)
|
||||
* New upstream version 0.6.5.10
|
||||
|
||||
-- Aron Xu <aron@debian.org> Wed, 05 Jul 2017 18:11:39 +0800
|
||||
|
||||
zfs-linux (0.6.5.9-5) unstable; urgency=medium
|
||||
|
||||
* Add zfs initramfs conf for root pool setup
|
||||
(Closes: #848157, LP: #1673197)
|
||||
|
||||
-- Aron Xu <aron@debian.org> Sun, 19 Mar 2017 18:14:57 +0800
|
||||
|
||||
zfs-linux (0.6.5.9-4) unstable; urgency=medium
|
||||
|
||||
* autopkgtest: load zfs module before running tests
|
||||
|
||||
-- Aron Xu <aron@debian.org> Tue, 14 Mar 2017 11:38:08 +0800
|
||||
|
||||
zfs-linux (0.6.5.9-3) unstable; urgency=medium
|
||||
|
||||
[ Petter Reinholdtsen ]
|
||||
* Updated German debconf translation by Helge Kreutzmann. (Closes: #857528)
|
||||
* Updated metadata on a few patches.
|
||||
|
||||
[ Aron Xu ]
|
||||
* Cherry-pick upstream fix for merged /usr/lib and /lib
|
||||
* Manually maintain adt test Depends
|
||||
|
||||
-- Aron Xu <aron@debian.org> Mon, 13 Mar 2017 12:23:32 +0800
|
||||
|
||||
zfs-linux (0.6.5.9-2) unstable; urgency=medium
|
||||
|
||||
[ Fabian Grünbichler ]
|
||||
* fix zed-service-bindir patch
|
||||
|
||||
-- Aron Xu <aron@debian.org> Tue, 07 Feb 2017 17:22:02 +0800
|
||||
|
||||
zfs-linux (0.6.5.9-1) unstable; urgency=medium
|
||||
|
||||
[ Aron Xu ]
|
||||
* Imported Upstream version 0.6.5.9 (Closes: #851513)
|
||||
|
||||
[ Lukas Wunner ]
|
||||
* Cherry picks for root zpool with dracut (Closes: #849969)
|
||||
* Fix installation path of systemd files
|
||||
* Fix build breakage caused by nonstandard umask
|
||||
|
||||
[ Fabian Grünbichler ]
|
||||
* fix python script install path (Closes: #842237)
|
||||
|
||||
-- Aron Xu <aron@debian.org> Mon, 06 Feb 2017 15:57:50 +0800
|
||||
|
||||
zfs-linux (0.6.5.8-3) unstable; urgency=medium
|
||||
|
||||
* Fix the path on the zfs-zed unit file (Closes: #849813)
|
||||
|
||||
-- Carlos Alberto Lopez Perez <clopez@igalia.com> Thu, 05 Jan 2017 16:23:16 +0100
|
||||
|
||||
zfs-linux (0.6.5.8-2) unstable; urgency=medium
|
||||
|
||||
[ Richard Laager ]
|
||||
* Remove .py extension from utilities in /usr/sbin as per policy
|
||||
10.4 Scripts (LP: #1628279)
|
||||
|
||||
[ Colin Ian King ]
|
||||
* Use python3 for arcstat.py, arc_summary.py & dbufstat.py (LP: #1627909)
|
||||
|
||||
[ Richard Laager ]
|
||||
* Set PATH in cron.d job to fix monthly scrubs. (LP: #1548009)
|
||||
|
||||
[ Aron Xu ]
|
||||
* Install zed into /usr/sbin
|
||||
* Rename zfsutils path to follow the package name
|
||||
* Add missing part in python3 move
|
||||
* Install zed to /usr/sbin
|
||||
|
||||
[ Petter Reinholdtsen ]
|
||||
* Updated Italian debconf translation by Beatrice Torracca.
|
||||
(Closes: #846928)
|
||||
* Added patch 1003-linux-4.9-compat.patch from upstream to build with
|
||||
Linux kernel 4.9. (Closes: #847018)
|
||||
|
||||
-- Aron Xu <aron@debian.org> Sat, 17 Dec 2016 17:42:21 +0800
|
||||
|
||||
zfs-linux (0.6.5.8-1) unstable; urgency=medium
|
||||
|
||||
[ Carlos Alberto Lopez Perez ]
|
||||
* Reflow changelog from last upload to avoid lintian warning.
|
||||
|
||||
[ Aron Xu ]
|
||||
* Imported Upstream version 0.6.5.8 (Closes: #838192)
|
||||
* Conflicts with zutils (Closes: #836853)
|
||||
|
||||
[ Zhou Mo ]
|
||||
* Patch: remove merged patches.
|
||||
* Upstream renamed zed.service to zfs-zed.service .
|
||||
* Avoid installing zfs-zed.service twice.
|
||||
|
||||
-- Aron Xu <aron@debian.org> Tue, 20 Sep 2016 15:20:21 +0800
|
||||
|
||||
zfs-linux (0.6.5.7-2) unstable; urgency=medium
|
||||
|
||||
[ Aron Xu ]
|
||||
* Add busybox to zfs-initramfs list of dependencies. (Closes: #824976)
|
||||
|
||||
[ Petter Reinholdtsen ]
|
||||
* Updated Danish debconf translation by Joe Hansen. (Closes: #830652)
|
||||
* Added Dutch (nl) debconf translation by Frans Spiesschaert.
|
||||
(Closes: #832280)
|
||||
* Norwegian Bokmål (nb) debconf template translation by Petter Reinholdtsen.
|
||||
|
||||
[ Eric Desrochers ]
|
||||
* Change utilities path (bindir) to /usr/sbin. (Closes: #832938)
|
||||
|
||||
[ Carlos Alberto Lopez Perez]
|
||||
* Add tunable to ignore hole_birth, and enable it by default.
|
||||
(Closes: #830824)
|
||||
|
||||
-- Carlos Alberto Lopez Perez <clopez@igalia.com> Tue, 16 Aug 2016 17:43:48 +0200
|
||||
|
||||
zfs-linux (0.6.5.7-1) unstable; urgency=medium
|
||||
|
||||
[ YunQiang Su ]
|
||||
* 1002-fix-mips-build.patch: fix builds on mips* archs
|
||||
|
||||
[ Aron Xu ]
|
||||
* New upstream release.
|
||||
* 1001-Fix-aarch64-compilation.patch: dropped, not needed anymore
|
||||
* Merge patches from Ubuntu:
|
||||
- 0002-Check-for-META-and-DCH-consistency-in-autoconf.patch
|
||||
- 0003-Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core.patch
|
||||
- enable-zed.patch
|
||||
|
||||
-- Aron Xu <aron@debian.org> Tue, 31 May 2016 14:10:49 +0800
|
||||
|
||||
zfs-linux (0.6.5.6-2) unstable; urgency=medium
|
||||
|
||||
[ Aron Xu ]
|
||||
* Adding smoke testing scripts from Ubuntu
|
||||
* Fix binary module builds
|
||||
* Add libblkid-dev, libattr1-dev to build-dep
|
||||
* Re-sync source tree
|
||||
* Add dh-python to b-d
|
||||
* Remove .gitignore files and clean build tree
|
||||
* Scrub all healthy pools monthly from Richard Laager
|
||||
|
||||
[ Petter Reinholdtsen ]
|
||||
* Copied 1000-ppc64el-endian-support.patch from Ubuntu to fix endian
|
||||
build problem on ppc64el
|
||||
* Copied 1001-Fix-aarch64-compilation.patch from Ubuntu to fix build
|
||||
problem on arm64.
|
||||
* Copied 0001-Prevent-manual-builds-in-the-DKMS-source.patch from
|
||||
Ubuntu to block manual building in the DKMS source tree.
|
||||
* Updated Standards-Version from 3.9.7 to 3.9.8.
|
||||
* Bring some files back to the upstream tarball content to get gbp
|
||||
buildpackage working.
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Thu, 12 May 2016 12:19:55 +0200
|
||||
|
||||
zfs-linux (0.6.5.6-1) unstable; urgency=medium
|
||||
|
||||
[ Aron Xu ]
|
||||
* New upstream version 0.6.5.6.
|
||||
|
||||
[ Petter Reinholdtsen ]
|
||||
* Generated new copyright.cme file based on version 0.6.5.6.
|
||||
* Updated d/copyright file, add missing BSD licensed init.d scripts, and
|
||||
new copyright holders in the new upstream version.
|
||||
* Updated Standards-Version from 3.9.6 to 3.9.7.
|
||||
* Added myself as uploader.
|
||||
* Updated debconf po files based on newest pot file.
|
||||
* Correct URL to git repo in d/control.
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Sat, 26 Mar 2016 07:08:11 +0000
|
||||
|
||||
zfs-linux (0.6.5.5-1) unstable; urgency=medium
|
||||
|
||||
* Initial Release (Closes: #686447)
|
||||
|
||||
-- Aron Xu <aron@debian.org> Sun, 20 Mar 2016 22:57:06 +0800
|
||||
Vendored
+281
@@ -0,0 +1,281 @@
|
||||
Source: zfs-linux
|
||||
Section: contrib/kernel
|
||||
Priority: optional
|
||||
Maintainer: Proxmox Support Team <support@proxmox.com>
|
||||
Build-Depends: abigail-tools,
|
||||
debhelper-compat (= 12),
|
||||
dh-python,
|
||||
libblkid-dev,
|
||||
libelf-dev,
|
||||
libpam0g-dev,
|
||||
libssl-dev | libssl1.0-dev,
|
||||
libtool,
|
||||
lsb-release,
|
||||
python3-cffi,
|
||||
python3-setuptools,
|
||||
python3-sphinx,
|
||||
python3-all-dev,
|
||||
uuid-dev,
|
||||
zlib1g-dev
|
||||
Standards-Version: 4.5.1
|
||||
Homepage: https://www.zfsonlinux.org/
|
||||
Vcs-Git: https://git.proxmox.com/git/zfsonlinux.git
|
||||
Vcs-Browser: https://git.proxmox.com/?p=zfsonlinux.git;a=summary
|
||||
|
||||
Package: libnvpair3linux
|
||||
Section: contrib/libs
|
||||
Architecture: linux-any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Breaks: libnvpair1, libnvpair1linux, libnvpair2linux, libnvpair3
|
||||
Replaces: libnvpair1, libnvpair1linux, libnvpair2linux, libnvpair3
|
||||
Description: Solaris name-value library for Linux
|
||||
This library provides routines for packing and unpacking nv pairs for
|
||||
transporting data across process boundaries, transporting between
|
||||
kernel and userland, and possibly saving onto disk files.
|
||||
|
||||
Package: libpam-zfs
|
||||
Section: contrib/admin
|
||||
Architecture: linux-any
|
||||
Depends: libpam-runtime, ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: PAM module for managing encryption keys for ZFS
|
||||
OpenZFS is a storage platform that encompasses the functionality of
|
||||
traditional filesystems and volume managers. It supports data checksums,
|
||||
compression, encryption, snapshots, and more.
|
||||
.
|
||||
This provides a Pluggable Authentication Module (PAM) that automatically
|
||||
unlocks encrypted ZFS datasets upon login.
|
||||
|
||||
Package: libuutil3linux
|
||||
Section: contrib/libs
|
||||
Architecture: linux-any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Breaks: libuutil1, libuutil1linux, libuutil2linux, libuutil3
|
||||
Replaces: libuutil1, libuutil1linux, libuutil2linux, libuutil3
|
||||
Description: Solaris userland utility library for Linux
|
||||
This library provides a variety of glue functions for ZFS on Linux:
|
||||
* libspl: The Solaris Porting Layer userland library, which provides APIs
|
||||
that make it possible to run Solaris user code in a Linux environment
|
||||
with relatively minimal modification.
|
||||
* libavl: The Adelson-Velskii Landis balanced binary tree manipulation
|
||||
library.
|
||||
* libefi: The Extensible Firmware Interface library for GUID disk
|
||||
partitioning.
|
||||
* libshare: NFS, SMB, and iSCSI service integration for ZFS.
|
||||
|
||||
Package: libzfslinux-dev
|
||||
Section: contrib/libdevel
|
||||
Architecture: linux-any
|
||||
Depends: libssl-dev | libssl1.0-dev,
|
||||
libnvpair3linux (= ${binary:Version}),
|
||||
libuutil3linux (= ${binary:Version}),
|
||||
libzfs4linux (= ${binary:Version}),
|
||||
libzfsbootenv1linux (= ${binary:Version}),
|
||||
libzpool4linux (= ${binary:Version}),
|
||||
${misc:Depends}
|
||||
Provides: libnvpair-dev, libuutil-dev
|
||||
Description: OpenZFS filesystem development files for Linux
|
||||
Header files and static libraries for compiling software against
|
||||
libraries of OpenZFS filesystem.
|
||||
.
|
||||
This package includes the development files of libnvpair3, libuutil3,
|
||||
libzpool4 and libzfs4.
|
||||
|
||||
Package: libzfs4linux
|
||||
Section: contrib/libs
|
||||
Architecture: linux-any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Breaks: libzfs2, libzfs2linux, libzfs3linux, libzfs4
|
||||
Replaces: libzfs2, libzfs2linux, libzfs3linux, libzfs4
|
||||
Description: OpenZFS filesystem library for Linux
|
||||
OpenZFS is a storage platform that encompasses the functionality of
|
||||
traditional filesystems and volume managers. It supports data checksums,
|
||||
compression, encryption, snapshots, and more.
|
||||
.
|
||||
The OpenZFS library provides support for managing OpenZFS filesystems.
|
||||
|
||||
Package: libzfsbootenv1linux
|
||||
Section: contrib/libs
|
||||
Architecture: linux-any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Breaks: libzfs2, libzfs4
|
||||
Replaces: libzfs2, libzfs4
|
||||
Description: OpenZFS filesystem library for Linux
|
||||
OpenZFS is a storage platform that encompasses the functionality of
|
||||
traditional filesystems and volume managers. It supports data checksums,
|
||||
compression, encryption, snapshots, and more.
|
||||
.
|
||||
The zfsbootenv library provides support for modifying ZFS label information.
|
||||
|
||||
Package: libzpool4linux
|
||||
Section: contrib/libs
|
||||
Architecture: linux-any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Breaks: libzpool2, libzpool2linux, libzpool3linux, libzpool4
|
||||
Replaces: libzpool2, libzpool2linux, libzpool3linux, libzpool4
|
||||
Description: OpenZFS pool library for Linux
|
||||
OpenZFS is a storage platform that encompasses the functionality of
|
||||
traditional filesystems and volume managers. It supports data checksums,
|
||||
compression, encryption, snapshots, and more.
|
||||
.
|
||||
This zpool library provides support for managing zpools.
|
||||
|
||||
Package: python3-pyzfs
|
||||
Section: contrib/python
|
||||
Architecture: linux-any
|
||||
Depends: ${misc:Depends},
|
||||
${python3:Depends},
|
||||
python3-cffi,
|
||||
zfsutils-linux (= ${binary:Version})
|
||||
Description: wrapper for libzfs_core C library
|
||||
libzfs_core is intended to be a stable interface for programmatic
|
||||
administration of ZFS. This wrapper provides one-to-one wrappers for
|
||||
libzfs_core API functions, but the signatures and types are more natural to
|
||||
Python.
|
||||
.
|
||||
nvlists are wrapped as dictionaries or lists depending on their usage.
|
||||
Some parameters have default values depending on typical use for
|
||||
increased convenience. Enumerations and bit flags become strings and lists
|
||||
of strings in Python. Errors are reported as exceptions rather than integer
|
||||
errno-style error codes. The wrapper takes care to provide one-to-many
|
||||
mapping of the error codes to the exceptions by interpreting a context
|
||||
in which the error code is produced.
|
||||
|
||||
Package: pyzfs-doc
|
||||
Section: contrib/doc
|
||||
Architecture: all
|
||||
Depends:
|
||||
${sphinxdoc:Depends},
|
||||
${misc:Depends}
|
||||
Recommends:
|
||||
python3-pyzfs
|
||||
Description: wrapper for libzfs_core C library (documentation)
|
||||
libzfs_core is intended to be a stable interface for programmatic
|
||||
administration of ZFS. This wrapper provides one-to-one wrappers for
|
||||
libzfs_core API functions, but the signatures and types are more natural to
|
||||
Python.
|
||||
.
|
||||
nvlists are wrapped as dictionaries or lists depending on their usage.
|
||||
Some parameters have default values depending on typical use for
|
||||
increased convenience. Enumerations and bit flags become strings and lists
|
||||
of strings in Python. Errors are reported as exceptions rather than integer
|
||||
errno-style error codes. The wrapper takes care to provide one-to-many
|
||||
mapping of the error codes to the exceptions by interpreting a context
|
||||
in which the error code is produced.
|
||||
.
|
||||
This package contains the documentation.
|
||||
|
||||
Package: zfs-initramfs
|
||||
Architecture: all
|
||||
Depends: busybox-initramfs | busybox-static | busybox,
|
||||
initramfs-tools,
|
||||
zfsutils-linux (>= ${binary:Version}),
|
||||
${misc:Depends}
|
||||
Breaks: zfsutils-linux (<= 0.7.11-pve1~bpo1)
|
||||
Replaces: zfsutils-linux (<= 0.7.11-pve1~bpo1)
|
||||
Description: OpenZFS root filesystem capabilities for Linux - initramfs
|
||||
OpenZFS is a storage platform that encompasses the functionality of
|
||||
traditional filesystems and volume managers. It supports data checksums,
|
||||
compression, encryption, snapshots, and more.
|
||||
.
|
||||
This package adds OpenZFS to the system initramfs with a hook
|
||||
for the initramfs-tools infrastructure.
|
||||
|
||||
Package: zfsutils-linux
|
||||
Section: contrib/admin
|
||||
Architecture: linux-any
|
||||
Depends: python3, ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
|
||||
Recommends: lsb-base, zfs-zed
|
||||
Suggests: nfs-kernel-server,
|
||||
samba-common-bin (>= 3.0.23),
|
||||
zfs-initramfs
|
||||
Conflicts: zfs, zfs-fuse
|
||||
Provides: zfsutils
|
||||
Description: command-line tools to manage OpenZFS filesystems
|
||||
OpenZFS is a storage platform that encompasses the functionality of
|
||||
traditional filesystems and volume managers. It supports data checksums,
|
||||
compression, encryption, snapshots, and more.
|
||||
.
|
||||
This package provides the zfs and zpool commands to create and administer
|
||||
OpenZFS filesystems.
|
||||
|
||||
Package: zfs-zed
|
||||
Section: contrib/admin
|
||||
Architecture: linux-any
|
||||
Depends: zfsutils-linux (>= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: OpenZFS Event Daemon
|
||||
OpenZFS is a storage platform that encompasses the functionality of
|
||||
traditional filesystems and volume managers. It supports data checksums,
|
||||
compression, encryption, snapshots, and more.
|
||||
.
|
||||
ZED (ZFS Event Daemon) monitors events generated by the ZFS kernel
|
||||
module. When a zevent (ZFS Event) is posted, ZED will run any ZEDLETs
|
||||
(ZFS Event Daemon Linkage for Executable Tasks) that have been enabled
|
||||
for the corresponding zevent class.
|
||||
.
|
||||
This package provides the OpenZFS Event Daemon (zed).
|
||||
|
||||
Package: zfs-test
|
||||
Section: contrib/admin
|
||||
Architecture: linux-any
|
||||
Depends: acl,
|
||||
attr,
|
||||
bc,
|
||||
fio,
|
||||
ksh,
|
||||
lsscsi,
|
||||
mdadm,
|
||||
parted,
|
||||
python3,
|
||||
python3-pyzfs,
|
||||
sudo,
|
||||
sysstat,
|
||||
zfsutils-linux (>=${binary:Version}),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Recommends: nfs-kernel-server
|
||||
Breaks: zfsutils-linux (<= 0.7.9-2)
|
||||
Replaces: zfsutils-linux (<= 0.7.9-2)
|
||||
Conflicts: zutils
|
||||
Description: OpenZFS test infrastructure and support scripts
|
||||
OpenZFS is a storage platform that encompasses the functionality of
|
||||
traditional filesystems and volume managers. It supports data checksums,
|
||||
compression, encryption, snapshots, and more.
|
||||
.
|
||||
This package provides the OpenZFS test infrastructure for destructively
|
||||
testing and validating a system using OpenZFS. It is entirely optional
|
||||
and should only be installed and used in test environments.
|
||||
|
||||
Package: spl
|
||||
Section: contrib/metapackages
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends},
|
||||
Suggests: zfs-test
|
||||
Description: Solaris Porting Layer user-space utilities for Linux (dummy)
|
||||
The Solaris Porting Layer (SPL) is a Linux kernel module which provides
|
||||
many of the Solaris kernel APIs. This shim layer makes it possible to
|
||||
run Solaris kernel code in the Linux kernel with relatively minimal
|
||||
modification. The Solaris Porting LAyer Tests (SPLAT) is a Linux kernel
|
||||
module which provides a testing harness for the SPL module.
|
||||
.
|
||||
SPL can be particularly useful when you want to track upstream Illumos
|
||||
(or any other OpenSolaris fork) development closely and don't want the
|
||||
overhead of maintaining a large patch which converts Solaris primitives
|
||||
to Linux primitives.
|
||||
.
|
||||
This is a transitional dummy package. It can safely be removed.
|
||||
|
||||
Package: zfs-dbg
|
||||
Section: contrib/metapackages
|
||||
Architecture: all
|
||||
Suggests: libnvpair3linux-dbgsym,
|
||||
libpam-zfs-dbgsym,
|
||||
libuutil3linux-dbgsym,
|
||||
libzfs4linux-dbgsym,
|
||||
libzfsbootenv1linux-dbgsym,
|
||||
libzpool4linux-dbgsym,
|
||||
zfs-test-dbgsym,
|
||||
zfsutils-linux-dbgsym,
|
||||
zfs-zed-dbgsym,
|
||||
Description: Transitional package. It can be safely removed.
|
||||
Vendored
+1281
File diff suppressed because it is too large
Load Diff
Vendored
+1161
File diff suppressed because it is too large
Load Diff
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
COPYRIGHT
|
||||
LICENSE
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
lib/@DEB_HOST_MULTIARCH@/libnvpair.so.*
|
||||
+1
@@ -0,0 +1 @@
|
||||
package-name-doesnt-match-sonames
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
lib/*/security/pam_zfs_key.so
|
||||
usr/share/pam-configs/zfs_key
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
pam-auth-update --package
|
||||
|
||||
#DEBHELPER#
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ "$1" = remove ] ; then
|
||||
pam-auth-update --package --remove zfs_key
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
COPYRIGHT
|
||||
LICENSE
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
lib/@DEB_HOST_MULTIARCH@/libuutil.so.*
|
||||
+1
@@ -0,0 +1 @@
|
||||
package-name-doesnt-match-sonames
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
COPYRIGHT
|
||||
LICENSE
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
lib/@DEB_HOST_MULTIARCH@/libzfs.so.*
|
||||
lib/@DEB_HOST_MULTIARCH@/libzfs_core.so.*
|
||||
+1
@@ -0,0 +1 @@
|
||||
package-name-doesnt-match-sonames
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
COPYRIGHT
|
||||
LICENSE
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
lib/libzfsbootenv.so.*
|
||||
+1
@@ -0,0 +1 @@
|
||||
lib/@DEB_HOST_MULTIARCH@/libzfsbootenv.so.*
|
||||
@@ -0,0 +1,2 @@
|
||||
package-name-doesnt-match-sonames
|
||||
extra-license-file usr/share/doc/libzfsbootenv1linux/LICENSE.gz
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
COPYRIGHT
|
||||
LICENSE
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
lib/@DEB_HOST_MULTIARCH@/*.a usr/lib/@DEB_HOST_MULTIARCH@/
|
||||
usr/include
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/*.so
|
||||
/usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/*.pc
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
COPYRIGHT
|
||||
LICENSE
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
lib/@DEB_HOST_MULTIARCH@/libzpool.so.*
|
||||
+1
@@ -0,0 +1 @@
|
||||
package-name-doesnt-match-sonames
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
usr/share/zfs/enum-extract.pl
|
||||
usr/share/zfs/zfs-helpers.sh
|
||||
etc/default/zfs
|
||||
etc/init.d
|
||||
etc/sudoers.d
|
||||
etc/zfs/vdev_id.conf.alias.example
|
||||
etc/zfs/vdev_id.conf.multipath.example
|
||||
etc/zfs/vdev_id.conf.sas_direct.example
|
||||
etc/zfs/vdev_id.conf.sas_switch.example
|
||||
etc/zfs/vdev_id.conf.scsi.example
|
||||
usr/lib/dracut
|
||||
usr/share/zfs/enum-extract.pl
|
||||
etc/zfs/zfs-functions
|
||||
@@ -0,0 +1,70 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Debian ZFS on Linux maintainers
|
||||
<pkg-zfsonlinux-devel@alioth-lists.debian.net>
|
||||
Date: Wed, 30 Jan 2019 15:12:04 +0100
|
||||
Subject: [PATCH] Check-for-META-and-DCH-consistency-in-autoconf
|
||||
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
config/zfs-meta.m4 | 34 +++++++++++++++++++++++++++++-----
|
||||
1 file changed, 29 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/config/zfs-meta.m4 b/config/zfs-meta.m4
|
||||
index b3c1befaa..660d8ccb9 100644
|
||||
--- a/config/zfs-meta.m4
|
||||
+++ b/config/zfs-meta.m4
|
||||
@@ -1,9 +1,10 @@
|
||||
dnl #
|
||||
dnl # DESCRIPTION:
|
||||
-dnl # Read meta data from the META file. When building from a git repository
|
||||
-dnl # the ZFS_META_RELEASE field will be overwritten if there is an annotated
|
||||
-dnl # tag matching the form ZFS_META_NAME-ZFS_META_VERSION-*. This allows
|
||||
-dnl # for working builds to be uniquely identified using the git commit hash.
|
||||
+dnl # Read meta data from the META file or the debian/changelog file if it
|
||||
+dnl # exists. When building from a git repository the ZFS_META_RELEASE field
|
||||
+dnl # will be overwritten if there is an annotated tag matching the form
|
||||
+dnl # ZFS_META_NAME-ZFS_META_VERSION-*. This allows for working builds to be
|
||||
+dnl # uniquely identified using the git commit hash.
|
||||
dnl #
|
||||
dnl # The META file format is as follows:
|
||||
dnl # ^[ ]*KEY:[ \t]+VALUE$
|
||||
@@ -49,6 +50,7 @@ AC_DEFUN([ZFS_AC_META], [
|
||||
_zfs_ac_meta_type="none"
|
||||
if test -f "$META"; then
|
||||
_zfs_ac_meta_type="META file"
|
||||
+ _dpkg_parsechangelog=$(dpkg-parsechangelog 2>/dev/null)
|
||||
|
||||
ZFS_META_NAME=_ZFS_AC_META_GETVAL([(Name|Project|Package)]);
|
||||
if test -n "$ZFS_META_NAME"; then
|
||||
@@ -69,8 +71,30 @@ AC_DEFUN([ZFS_AC_META], [
|
||||
AC_SUBST([ZFS_META_VERSION])
|
||||
fi
|
||||
|
||||
+ if test -n "${_dpkg_parsechangelog}"; then
|
||||
+ _dpkg_version=$(echo "${_dpkg_parsechangelog}" \
|
||||
+ | $AWK '$[]1 == "Version:" { print $[]2; }' \
|
||||
+ | cut -d- -f1)
|
||||
+ if test "${_dpkg_version}" != "$ZFS_META_VERSION"; then
|
||||
+ AC_MSG_ERROR([
|
||||
+ *** Version $ZFS_META_VERSION in the META file is different than
|
||||
+ *** version $_dpkg_version in the debian/changelog file. DKMS and DEB
|
||||
+ *** packaging require that these files have the same version.
|
||||
+ ])
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
ZFS_META_RELEASE=_ZFS_AC_META_GETVAL([Release]);
|
||||
- if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
+
|
||||
+ if test -n "${_dpkg_parsechangelog}"; then
|
||||
+ _dpkg_release=$(echo "${_dpkg_parsechangelog}" \
|
||||
+ | $AWK '$[]1 == "Version:" { print $[]2; }' \
|
||||
+ | cut -d- -f2-)
|
||||
+ if test -n "${_dpkg_release}"; then
|
||||
+ ZFS_META_RELEASE=${_dpkg_release}
|
||||
+ _zfs_ac_meta_type="dpkg-parsechangelog"
|
||||
+ fi
|
||||
+ elif test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
_match="${ZFS_META_NAME}-${ZFS_META_VERSION}"
|
||||
_alias=$(git describe --match=${_match} 2>/dev/null)
|
||||
_release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g')
|
||||
+9
-10
@@ -12,19 +12,18 @@ is needed for zfs-mount, zfs-share and zfs-zed services in case ZFS is
|
||||
not actually used.
|
||||
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
etc/modules-load.d/zfs.conf.in | 2 +-
|
||||
etc/modules-load.d/zfs.conf | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/etc/modules-load.d/zfs.conf.in b/etc/modules-load.d/zfs.conf.in
|
||||
index 8b41baa3..59b058c9 100644
|
||||
--- a/etc/modules-load.d/zfs.conf.in
|
||||
+++ b/etc/modules-load.d/zfs.conf.in
|
||||
diff --git a/etc/modules-load.d/zfs.conf b/etc/modules-load.d/zfs.conf
|
||||
index 44e1bb3ed..7509b03cb 100644
|
||||
--- a/etc/modules-load.d/zfs.conf
|
||||
+++ b/etc/modules-load.d/zfs.conf
|
||||
@@ -1,3 +1,3 @@
|
||||
# Always load kernel modules at boot. The default behavior is to load the
|
||||
# kernel modules in the zfs-import-*.service or when blkid(8) detects a pool.
|
||||
# The default behavior is to allow udev to load the kernel modules on demand.
|
||||
# Uncomment the following line to unconditionally load them at boot.
|
||||
-#zfs
|
||||
+zfs
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
|
||||
Date: Mon, 6 Feb 2017 12:04:35 +0100
|
||||
Subject: [PATCH] Fix the path to the zed binary on the systemd unit.
|
||||
|
||||
We install zed into /usr/sbin manually meanwhile the upstream default is
|
||||
installing it into /sbin. Ubuntu packages also install zed to /usr/sbin, but
|
||||
they ship their own zfs-zed unit.
|
||||
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
etc/systemd/system/zfs-zed.service.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/etc/systemd/system/zfs-zed.service.in b/etc/systemd/system/zfs-zed.service.in
|
||||
index 008075138..570e27707 100644
|
||||
--- a/etc/systemd/system/zfs-zed.service.in
|
||||
+++ b/etc/systemd/system/zfs-zed.service.in
|
||||
@@ -4,7 +4,7 @@ Documentation=man:zed(8)
|
||||
ConditionPathIsDirectory=/sys/module/zfs
|
||||
|
||||
[Service]
|
||||
-ExecStart=@sbindir@/zed -F
|
||||
+ExecStart=/usr/sbin/zed -F
|
||||
Restart=on-abort
|
||||
|
||||
[Install]
|
||||
+5
-6
@@ -7,23 +7,22 @@ Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
etc/systemd/system/zfs-import-scan.service.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in
|
||||
index abc8e8e6..8fe2c107 100644
|
||||
index f0317e23e..9a5e9cb17 100644
|
||||
--- a/etc/systemd/system/zfs-import-scan.service.in
|
||||
+++ b/etc/systemd/system/zfs-import-scan.service.in
|
||||
@@ -12,7 +12,7 @@ ConditionPathExists=!@sysconfdir@/zfs/zpool.cache
|
||||
@@ -13,7 +13,7 @@ ConditionPathIsDirectory=/sys/module/zfs
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=-/sbin/modprobe zfs
|
||||
-ExecStart=@sbindir@/zpool import -aN -o cachefile=none
|
||||
+ExecStart=@sbindir@/zpool import -aN -d /dev/disk/by-id -o cachefile=none
|
||||
|
||||
[Install]
|
||||
WantedBy=zfs-import.target
|
||||
--
|
||||
2.11.0
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Laager <rlaager@wiktel.com>
|
||||
Date: Wed, 30 Jan 2019 15:12:04 +0100
|
||||
Subject: [PATCH] Enable zed emails
|
||||
|
||||
The OpenZFS event daemon monitors pools. This patch enables the email sending
|
||||
function by default (if zed is installed). This is consistent with the default
|
||||
behavior of mdadm.
|
||||
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
cmd/zed/zed.d/zed.rc | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmd/zed/zed.d/zed.rc b/cmd/zed/zed.d/zed.rc
|
||||
index df560f921..4ce7af744 100644
|
||||
--- a/cmd/zed/zed.d/zed.rc
|
||||
+++ b/cmd/zed/zed.d/zed.rc
|
||||
@@ -15,7 +15,7 @@
|
||||
# Email will only be sent if ZED_EMAIL_ADDR is defined.
|
||||
# Disabled by default; uncomment to enable.
|
||||
#
|
||||
-#ZED_EMAIL_ADDR="root"
|
||||
+ZED_EMAIL_ADDR="root"
|
||||
|
||||
##
|
||||
# Name or path of executable responsible for sending notifications via email;
|
||||
@@ -41,7 +41,7 @@
|
||||
##
|
||||
# Minimum number of seconds between notifications for a similar event.
|
||||
#
|
||||
-#ZED_NOTIFY_INTERVAL_SECS=3600
|
||||
+ZED_NOTIFY_INTERVAL_SECS=3600
|
||||
|
||||
##
|
||||
# Notification verbosity.
|
||||
@@ -0,0 +1,29 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Russo <antonio.e.russo@gmail.com>
|
||||
Date: Fri, 20 Mar 2020 17:28:43 +0100
|
||||
Subject: [PATCH] dont symlink zed scripts
|
||||
|
||||
(cherry picked and adapted from 5cee380324d74e640d5dd7a360faba3994c8007f [0])
|
||||
|
||||
[0] https://salsa.debian.org/zfsonlinux-team/zfs.git
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
|
||||
Description: track default symlinks, instead of symlinking
|
||||
Forwarded: no need
|
||||
---
|
||||
cmd/zed/zed.d/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmd/zed/zed.d/Makefile.am b/cmd/zed/zed.d/Makefile.am
|
||||
index 8b2d0c200..118c96547 100644
|
||||
--- a/cmd/zed/zed.d/Makefile.am
|
||||
+++ b/cmd/zed/zed.d/Makefile.am
|
||||
@@ -48,6 +48,6 @@ install-data-hook:
|
||||
for f in $(zedconfdefaults); do \
|
||||
test -f "$(DESTDIR)$(zedconfdir)/$${f}" -o \
|
||||
-L "$(DESTDIR)$(zedconfdir)/$${f}" || \
|
||||
- ln -s "$(zedexecdir)/$${f}" "$(DESTDIR)$(zedconfdir)"; \
|
||||
+ echo "$${f}" >> "$(DESTDIR)$(zedexecdir)/DEFAULT-ENABLED" ; \
|
||||
done
|
||||
chmod 0600 "$(DESTDIR)$(zedconfdir)/zed.rc"
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Russo <antonio.e.russo@gmail.com>
|
||||
Date: Tue, 5 May 2020 22:15:16 -0600
|
||||
Subject: [PATCH] Use installed python3
|
||||
|
||||
---
|
||||
.../functional/cli_root/zfs_program/zfs_program_json.ksh | 6 +++---
|
||||
.../tests/functional/rsend/send_encrypted_files.ksh | 2 +-
|
||||
.../tests/functional/rsend/send_realloc_dnode_size.ksh | 2 +-
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh
|
||||
index 3788543b0..c7ee4ae9a 100755
|
||||
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh
|
||||
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh
|
||||
@@ -100,10 +100,10 @@ typeset -a pos_cmds_out=(
|
||||
# the same as the input and the --sort-keys option was added. Detect when
|
||||
# --sort-keys is supported and apply the option to ensure the expected order.
|
||||
#
|
||||
-if python -m json.tool --sort-keys <<< "{}"; then
|
||||
- JSON_TOOL_CMD="python -m json.tool --sort-keys"
|
||||
+if python3 -m json.tool --sort-keys <<< "{}"; then
|
||||
+ JSON_TOOL_CMD="python3 -m json.tool --sort-keys"
|
||||
else
|
||||
- JSON_TOOL_CMD="python -m json.tool"
|
||||
+ JSON_TOOL_CMD="python3 -m json.tool"
|
||||
fi
|
||||
|
||||
typeset -i cnt=0
|
||||
diff --git a/tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh b/tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh
|
||||
index f89cb3b31..375d483f7 100755
|
||||
--- a/tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh
|
||||
+++ b/tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh
|
||||
@@ -87,7 +87,7 @@ log_must xattrtest -f 10 -x 3 -s 32768 -r -k -p /$TESTPOOL/$TESTFS2/xattrsadir
|
||||
# ZoL issue #7432
|
||||
log_must zfs set compression=on xattr=sa $TESTPOOL/$TESTFS2
|
||||
log_must touch /$TESTPOOL/$TESTFS2/attrs
|
||||
-log_must eval "python -c 'print \"a\" * 4096' | \
|
||||
+log_must eval "python3 -c 'print \"a\" * 4096' | \
|
||||
set_xattr_stdin bigval /$TESTPOOL/$TESTFS2/attrs"
|
||||
log_must zfs set compression=off xattr=on $TESTPOOL/$TESTFS2
|
||||
|
||||
diff --git a/tests/zfs-tests/tests/functional/rsend/send_realloc_dnode_size.ksh b/tests/zfs-tests/tests/functional/rsend/send_realloc_dnode_size.ksh
|
||||
index 394fe95bb..43560aac5 100755
|
||||
--- a/tests/zfs-tests/tests/functional/rsend/send_realloc_dnode_size.ksh
|
||||
+++ b/tests/zfs-tests/tests/functional/rsend/send_realloc_dnode_size.ksh
|
||||
@@ -93,7 +93,7 @@ log_must zfs snapshot $POOL/fs@c
|
||||
# 4. Create an empty file and add xattrs to it to exercise reclaiming a
|
||||
# dnode that requires more than 1 slot for its bonus buffer (Zol #7433)
|
||||
log_must zfs set compression=on xattr=sa $POOL/fs
|
||||
-log_must eval "python -c 'print \"a\" * 512' |
|
||||
+log_must eval "python3 -c 'print \"a\" * 512' |
|
||||
set_xattr_stdin bigval /$POOL/fs/attrs"
|
||||
log_must zfs snapshot $POOL/fs@d
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
Date: Tue, 15 Sep 2020 19:07:24 +0200
|
||||
Subject: [PATCH] Add systemd-unit for importing specific pools
|
||||
|
||||
The unit can be instantiated with a specific poolname, which will get imported
|
||||
by scanning /dev/disk/by-id, irrespective of the existence and content of
|
||||
/etc/zfs/zpool.cache.
|
||||
|
||||
the instance name is used unescaped (see systemd.unit(5)), since zpool names
|
||||
can contain characters which will be escaped by systemd.
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
etc/systemd/system/50-zfs.preset.in | 1 +
|
||||
etc/systemd/system/Makefile.am | 1 +
|
||||
etc/systemd/system/zfs-import@.service.in | 16 ++++++++++++++++
|
||||
3 files changed, 18 insertions(+)
|
||||
create mode 100644 etc/systemd/system/zfs-import@.service.in
|
||||
|
||||
diff --git a/etc/systemd/system/50-zfs.preset.in b/etc/systemd/system/50-zfs.preset.in
|
||||
index e4056a92c..030611419 100644
|
||||
--- a/etc/systemd/system/50-zfs.preset.in
|
||||
+++ b/etc/systemd/system/50-zfs.preset.in
|
||||
@@ -1,6 +1,7 @@
|
||||
# ZFS is enabled by default
|
||||
enable zfs-import-cache.service
|
||||
disable zfs-import-scan.service
|
||||
+enable zfs-import@.service
|
||||
enable zfs-import.target
|
||||
enable zfs-mount.service
|
||||
enable zfs-share.service
|
||||
diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am
|
||||
index c374a52ac..25d1b99d7 100644
|
||||
--- a/etc/systemd/system/Makefile.am
|
||||
+++ b/etc/systemd/system/Makefile.am
|
||||
@@ -7,6 +7,7 @@ systemdunit_DATA = \
|
||||
zfs-zed.service \
|
||||
zfs-import-cache.service \
|
||||
zfs-import-scan.service \
|
||||
+ zfs-import@.service \
|
||||
zfs-mount.service \
|
||||
zfs-share.service \
|
||||
zfs-volume-wait.service \
|
||||
diff --git a/etc/systemd/system/zfs-import@.service.in b/etc/systemd/system/zfs-import@.service.in
|
||||
new file mode 100644
|
||||
index 000000000..9b4ee9371
|
||||
--- /dev/null
|
||||
+++ b/etc/systemd/system/zfs-import@.service.in
|
||||
@@ -0,0 +1,16 @@
|
||||
+[Unit]
|
||||
+Description=Import ZFS pool %i
|
||||
+Documentation=man:zpool(8)
|
||||
+DefaultDependencies=no
|
||||
+After=systemd-udev-settle.service
|
||||
+After=cryptsetup.target
|
||||
+After=multipathd.target
|
||||
+Before=zfs-import.target
|
||||
+
|
||||
+[Service]
|
||||
+Type=oneshot
|
||||
+RemainAfterExit=yes
|
||||
+ExecStart=@sbindir@/zpool import -N -d /dev/disk/by-id -o cachefile=none %I
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=zfs-import.target
|
||||
@@ -0,0 +1,54 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
Date: Thu, 4 Feb 2021 19:01:12 +0100
|
||||
Subject: [PATCH] Patch: move manpage arcstat(1) to arcstat(8).
|
||||
|
||||
Originally-By: Mo Zhou <cdluminate@gmail.com>
|
||||
Originally-By: Antonio Russo <aerusso@aerusso.net>
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
man/man1/Makefile.am | 2 +-
|
||||
man/man8/Makefile.am | 1 +
|
||||
man/{man1/arcstat.1 => man8/arcstat.8} | 2 +-
|
||||
3 files changed, 3 insertions(+), 2 deletions(-)
|
||||
rename man/{man1/arcstat.1 => man8/arcstat.8} (99%)
|
||||
|
||||
diff --git a/man/man1/Makefile.am b/man/man1/Makefile.am
|
||||
index 8d7457a3e..101af7b6c 100644
|
||||
--- a/man/man1/Makefile.am
|
||||
+++ b/man/man1/Makefile.am
|
||||
@@ -1,4 +1,4 @@
|
||||
-dist_man_MANS = zhack.1 ztest.1 raidz_test.1 zvol_wait.1 arcstat.1
|
||||
+dist_man_MANS = zhack.1 ztest.1 raidz_test.1 zvol_wait.1
|
||||
EXTRA_DIST = cstyle.1
|
||||
|
||||
if BUILD_LINUX
|
||||
diff --git a/man/man8/Makefile.am b/man/man8/Makefile.am
|
||||
index 07f6aefa6..a757b1c62 100644
|
||||
--- a/man/man8/Makefile.am
|
||||
+++ b/man/man8/Makefile.am
|
||||
@@ -1,6 +1,7 @@
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
dist_man_MANS = \
|
||||
+ arcstat.8 \
|
||||
fsck.zfs.8 \
|
||||
mount.zfs.8 \
|
||||
vdev_id.8 \
|
||||
diff --git a/man/man1/arcstat.1 b/man/man8/arcstat.8
|
||||
similarity index 99%
|
||||
rename from man/man1/arcstat.1
|
||||
rename to man/man8/arcstat.8
|
||||
index ca508b49c..0aa81849a 100644
|
||||
--- a/man/man1/arcstat.1
|
||||
+++ b/man/man8/arcstat.8
|
||||
@@ -13,7 +13,7 @@
|
||||
.\" Copyright (c) 2015 by Delphix. All rights reserved.
|
||||
.\" Copyright (c) 2020 by AJ Jordan. All rights reserved.
|
||||
.\"
|
||||
-.TH ARCSTAT 1 "Oct 20, 2020" OpenZFS
|
||||
+.TH ARCSTAT 8 "Oct 20, 2020" OpenZFS
|
||||
.SH NAME
|
||||
arcstat \- report ZFS ARC and L2ARC statistics
|
||||
.SH SYNOPSIS
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
0001-Check-for-META-and-DCH-consistency-in-autoconf.patch
|
||||
0002-always-load-ZFS-module-on-boot.patch
|
||||
0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
|
||||
0004-import-with-d-dev-disk-by-id-in-scan-service.patch
|
||||
0005-Enable-zed-emails.patch
|
||||
0006-dont-symlink-zed-scripts.patch
|
||||
0007-Use-installed-python3.patch
|
||||
0008-Add-systemd-unit-for-importing-specific-pools.patch
|
||||
0009-Patch-move-manpage-arcstat-1-to-arcstat-8.patch
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
usr/lib/python3*
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
include /usr/share/dpkg/default.mk
|
||||
|
||||
VERSION := $(DEB_VERSION_UPSTREAM)
|
||||
REVISION := $(shell echo $(DEB_VERSION) | cut -d- -f2)
|
||||
|
||||
SPHINX_BUILD = $(shell dpkg -L python3-sphinx | grep -m 1 "/sphinx-build$$")
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
%:
|
||||
dh $@ --with autoreconf,python3,sphinxdoc --parallel
|
||||
|
||||
adapt_meta_file:
|
||||
@# Embed the downstream version in the module.
|
||||
@sed \
|
||||
-e 's/^Version:.*/Version: $(VERSION)/' \
|
||||
-e 's/^Release:.*/Release: $(REVISION)/' \
|
||||
-i.orig META
|
||||
|
||||
|
||||
override_dh_autoreconf: adapt_meta_file
|
||||
dh_autoreconf
|
||||
|
||||
override_dh_auto_configure:
|
||||
@# Build the userland, but don't build the kernel modules.
|
||||
dh_auto_configure -- \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/sbin \
|
||||
--libdir=/lib/"$(DEB_HOST_MULTIARCH)" \
|
||||
--with-udevdir=/lib/udev \
|
||||
--with-zfsexecdir=/usr/lib/zfs-linux \
|
||||
--enable-systemd \
|
||||
--enable-pyzfs \
|
||||
--with-python=python3 \
|
||||
--with-pammoduledir='/lib/$(DEB_HOST_MULTIARCH)/security' \
|
||||
--with-pkgconfigdir='/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig' \
|
||||
--with-systemdunitdir=/lib/systemd/system \
|
||||
--with-systemdpresetdir=/lib/systemd/system-preset \
|
||||
--with-systemdgeneratordir=/lib/systemd/system-generators \
|
||||
--with-config=user
|
||||
|
||||
for i in $(wildcard $(CURDIR)/debian/*.install.in) ; do \
|
||||
basename "$$i" | grep _KVERS_ && continue ; \
|
||||
sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' "$$i" > "$${i%%.in}" ; \
|
||||
done
|
||||
|
||||
override_dh_auto_test:
|
||||
override_dh_auto_test:
|
||||
ifeq (amd64,$(DEB_HOST_ARCH))
|
||||
# Upstream provides an ABI guarantee that we validate here
|
||||
$(MAKE) checkabi
|
||||
endif
|
||||
|
||||
# The dh_auto_test rule is disabled because
|
||||
# `make check` cannot run in an unprivileged build environment.
|
||||
|
||||
override_dh_auto_install:
|
||||
@# Install the utilities.
|
||||
$(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
|
||||
|
||||
# Use upstream's bash completion
|
||||
install -D -t '$(CURDIR)/debian/tmp/usr/share/bash-completion/completions/' \
|
||||
'$(CURDIR)/contrib/bash_completion.d/zfs'
|
||||
|
||||
# Move from bin_dir to /usr/sbin
|
||||
# Remove suffix (.py) as per policy 10.4 - Scripts
|
||||
# https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
|
||||
mkdir -p '$(CURDIR)/debian/tmp/usr/sbin/'
|
||||
mv '$(CURDIR)/debian/tmp/usr/bin/arc_summary' '$(CURDIR)/debian/tmp/usr/sbin/arc_summary'
|
||||
mv '$(CURDIR)/debian/tmp/usr/bin/arcstat' '$(CURDIR)/debian/tmp/usr/sbin/arcstat'
|
||||
mv '$(CURDIR)/debian/tmp/usr/bin/dbufstat' '$(CURDIR)/debian/tmp/usr/sbin/dbufstat'
|
||||
|
||||
@# Zed has dependencies outside of the system root.
|
||||
mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
|
||||
|
||||
mkdir -p $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
|
||||
for i in `ls $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/*.so`; do \
|
||||
ln -s /lib/$(DEB_HOST_MULTIARCH)/`readlink $${i}` $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/`basename $${i}`; \
|
||||
rm $${i}; \
|
||||
done
|
||||
|
||||
chmod a-x '$(CURDIR)/debian/tmp/etc/zfs/zfs-functions'
|
||||
chmod a-x '$(CURDIR)/debian/tmp/etc/default/zfs'
|
||||
chmod a-x '$(CURDIR)/debian/tmp/usr/share/bash-completion/completions/zfs'
|
||||
|
||||
override_dh_python3:
|
||||
dh_python3 -p python3-pyzfs
|
||||
|
||||
override_dh_makeshlibs:
|
||||
dh_makeshlibs -a -V
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip --dbgsym-migration='zfs-dbg (<< 2.0.4~)'
|
||||
|
||||
override_dh_auto_clean:
|
||||
find . -name .gitignore -delete
|
||||
rm -rf zfs-$(DEB_VERSION_UPSTREAM)
|
||||
dh_auto_clean
|
||||
@if test -e META.orig; then mv META.orig META; fi
|
||||
|
||||
override_dh_install:
|
||||
find debian/tmp/lib -name *.la -delete
|
||||
dh_install
|
||||
|
||||
override_dh_missing:
|
||||
dh_missing --fail-missing
|
||||
|
||||
override_dh_installsystemd:
|
||||
# these to lines prevent the restarting of all systemd services, except
|
||||
# zfs-zed - they should not be restarted (importing, mounting, creating
|
||||
# links in /dev, and can cause erros in the log
|
||||
# (upon major.minor change)
|
||||
dh_installsystemd --no-stop-on-upgrade -X zfs-zed.service
|
||||
dh_installsystemd --name zfs-zed
|
||||
|
||||
override_dh_installdocs:
|
||||
dh_installdocs
|
||||
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
|
||||
http_proxy='127.0.0.1:9' $(SPHINX_BUILD) -N -bhtml "$(CURDIR)/contrib/pyzfs/docs/source/" debian/pyzfs-doc/usr/share/doc/pyzfs-doc/html/
|
||||
endif
|
||||
|
||||
# ------------
|
||||
|
||||
debian-copyright:
|
||||
cme update dpkg-copyright -file debian/copyright.cme
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
@@ -0,0 +1,8 @@
|
||||
for x in $(cat /proc/cmdline)
|
||||
do
|
||||
case $x in
|
||||
root=ZFS=*)
|
||||
BOOT=zfs
|
||||
;;
|
||||
esac
|
||||
done
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Add udev rules for ZoL to the initrd.
|
||||
#
|
||||
|
||||
PREREQ="udev"
|
||||
PREREQ_UDEV_RULES="60-zvol.rules 69-vdev.rules"
|
||||
COPY_EXEC_LIST="/lib/udev/zvol_id /lib/udev/vdev_id"
|
||||
|
||||
# Generic result code.
|
||||
RC=0
|
||||
|
||||
case $1 in
|
||||
prereqs)
|
||||
echo "$PREREQ"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
for ii in $COPY_EXEC_LIST
|
||||
do
|
||||
if [ ! -x "$ii" ]
|
||||
then
|
||||
echo "Error: $ii is not executable."
|
||||
RC=2
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$RC" -ne 0 ]
|
||||
then
|
||||
exit "$RC"
|
||||
fi
|
||||
|
||||
. /usr/share/initramfs-tools/hook-functions
|
||||
|
||||
mkdir -p "$DESTDIR/lib/udev/rules.d/"
|
||||
for ii in $PREREQ_UDEV_RULES
|
||||
do
|
||||
if [ -e "/etc/udev/rules.d/$ii" ]
|
||||
then
|
||||
cp -p "/etc/udev/rules.d/$ii" "$DESTDIR/lib/udev/rules.d/"
|
||||
elif [ -e "/lib/udev/rules.d/$ii" ]
|
||||
then
|
||||
cp -p "/lib/udev/rules.d/$ii" "$DESTDIR/lib/udev/rules.d/"
|
||||
else
|
||||
echo "Error: Missing udev rule: $ii"
|
||||
echo " This file must be in the /etc/udev/rules.d or /lib/udev/rules.d directory."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
for ii in $COPY_EXEC_LIST
|
||||
do
|
||||
copy_exec "$ii"
|
||||
done
|
||||
|
||||
if [ -f '/etc/default/zfs' -a -r '/etc/default/zfs' ]
|
||||
then
|
||||
mkdir -p "$DESTDIR/etc/default"
|
||||
cp -a '/etc/default/zfs' "$DESTDIR/etc/default/"
|
||||
fi
|
||||
|
||||
if [ -d '/etc/zfs' -a -r '/etc/zfs' ]
|
||||
then
|
||||
mkdir -p "$DESTDIR/etc"
|
||||
cp -a '/etc/zfs' "$DESTDIR/etc/"
|
||||
fi
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
## Allow read-only ZoL commands to be called through sudo
|
||||
## without a password. Remove the first '#' column to enable.
|
||||
##
|
||||
## CAUTION: Any syntax error introduced here will break sudo.
|
||||
##
|
||||
## Cmnd alias specification
|
||||
#Cmnd_Alias C_ZFS = \
|
||||
# /sbin/zfs "", /sbin/zfs help *, \
|
||||
# /sbin/zfs get, /sbin/zfs get *, \
|
||||
# /sbin/zfs list, /sbin/zfs list *, \
|
||||
# /sbin/zpool "", /sbin/zpool help *, \
|
||||
# /sbin/zpool iostat, /sbin/zpool iostat *, \
|
||||
# /sbin/zpool list, /sbin/zpool list *, \
|
||||
# /sbin/zpool status, /sbin/zpool status *, \
|
||||
# /sbin/zpool upgrade, /sbin/zpool upgrade -v
|
||||
#
|
||||
## allow any user to use basic read-only ZFS commands
|
||||
#ALL ALL = (root) NOPASSWD: C_ZFS
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# Sub-test to exclude ZVOLs
|
||||
set -e
|
||||
partition="$1"
|
||||
|
||||
. /usr/share/os-prober/common.sh
|
||||
|
||||
if [ "$(stat -L -c %t "$partition")" = "e6" ] ; then
|
||||
debug "$1 is a ZVOL; skipping"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# No ZVOLs found
|
||||
exit 1
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
# directly exit successfully when zfs module is not loaded
|
||||
if ! [ -d /sys/module/zfs ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# [auto] / enable / disable
|
||||
PROPERTY_NAME="org.debian:periodic-scrub"
|
||||
|
||||
get_property () {
|
||||
# Detect the ${PROPERTY_NAME} property on a given pool.
|
||||
# We are abusing user-defined properties on the root dataset,
|
||||
# since they're not available on pools https://github.com/openzfs/zfs/pull/11680
|
||||
# TODO: use zpool user-defined property when such feature is available.
|
||||
pool="$1"
|
||||
zfs get -H -o value "${PROPERTY_NAME}" "${pool}" 2>/dev/null || return 1
|
||||
}
|
||||
|
||||
scrub_if_not_scrub_in_progress () {
|
||||
pool="$1"
|
||||
if ! zpool status "${pool}" | grep -q "scrub in progress"; then
|
||||
# Ignore errors and continue with scrubbing other pools.
|
||||
zpool scrub "${pool}" || true
|
||||
fi
|
||||
}
|
||||
|
||||
# Scrub all healthy pools that are not already scrubbing as per their configs.
|
||||
zpool list -H -o health,name 2>&1 | \
|
||||
awk -F'\t' '$1 == "ONLINE" {print $2}' | \
|
||||
while read pool
|
||||
do
|
||||
# read user-defined config
|
||||
ret=$(get_property "${pool}")
|
||||
if [ $? -ne 0 ] || [ "disable" = "${ret}" ]; then
|
||||
:
|
||||
elif [ "-" = "${ret}" ] || [ "auto" = "${ret}" ] || [ "enable" = "${ret}" ]; then
|
||||
scrub_if_not_scrub_in_progress "${pool}"
|
||||
else
|
||||
cat > /dev/stderr <<EOF
|
||||
$0: [WARNING] illegal value "${ret}" for property "${PROPERTY_NAME}" of ZFS dataset "${pool}".
|
||||
$0: Acceptable choices for this property are: auto, enable, disable. The default is auto.
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
# directly exit successfully when zfs module is not loaded
|
||||
if ! [ -d /sys/module/zfs ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# [auto] / enable / disable
|
||||
PROPERTY_NAME="org.debian:periodic-trim"
|
||||
|
||||
get_property () {
|
||||
# Detect the ${PROPERTY_NAME} property on a given pool.
|
||||
# We are abusing user-defined properties on the root dataset,
|
||||
# since they're not available on pools https://github.com/openzfs/zfs/pull/11680
|
||||
# TODO: use zpool user-defined property when such feature is available.
|
||||
pool="$1"
|
||||
zfs get -H -o value "${PROPERTY_NAME}" "${pool}" 2>/dev/null || return 1
|
||||
}
|
||||
|
||||
trim_if_not_already_trimming () {
|
||||
pool="$1"
|
||||
if ! zpool status "${pool}" | grep -q "trimming"; then
|
||||
# Ignore errors (i.e. HDD pools),
|
||||
# and continue with trimming other pools.
|
||||
zpool trim "${pool}" || true
|
||||
fi
|
||||
}
|
||||
|
||||
zpool_is_nvme_only () {
|
||||
zpool=$1
|
||||
# get a list of devices attached to the specified zpool
|
||||
zpool list -vHPL "${zpool}" |
|
||||
awk -F'\t' '$2 ~ /^\/dev\// {
|
||||
if($2 !~ /^\/dev\/nvme/)
|
||||
exit 1
|
||||
}'
|
||||
}
|
||||
|
||||
# TRIM all healthy pools that are not already trimming as per their configs.
|
||||
zpool list -H -o health,name 2>&1 | \
|
||||
awk -F'\t' '$1 == "ONLINE" {print $2}' | \
|
||||
while read pool
|
||||
do
|
||||
# read user-defined config
|
||||
ret=$(get_property "${pool}")
|
||||
if [ $? -ne 0 ] || [ "disable" = "${ret}" ]; then
|
||||
:
|
||||
elif [ "enable" = "${ret}" ]; then
|
||||
trim_if_not_already_trimming "${pool}"
|
||||
elif [ "-" = "${ret}" ] || [ "auto" = "${ret}" ]; then
|
||||
if zpool_is_nvme_only "${pool}"; then
|
||||
trim_if_not_already_trimming "${pool}"
|
||||
fi
|
||||
else
|
||||
cat > /dev/stderr <<EOF
|
||||
$0: [WARNING] illegal value "${ret}" for property "${PROPERTY_NAME}" of ZFS dataset "${pool}".
|
||||
$0: Acceptable choices for this property are: auto, enable, disable. The default is auto.
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
version=3
|
||||
https://zfsonlinux.org/ .*zfs-([\d\.]+)\.tar\.gz$
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
../tree/zfs-initramfs/* /
|
||||
usr/share/initramfs-tools/*
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
sbin/zinject
|
||||
sbin/ztest
|
||||
usr/bin/raidz_test
|
||||
usr/share/man/man1/raidz_test.1
|
||||
usr/share/man/man1/test-runner.1
|
||||
usr/share/man/man1/ztest.1
|
||||
usr/share/man/man8/zinject.8
|
||||
usr/share/zfs/common.sh
|
||||
usr/share/zfs/runfiles/
|
||||
usr/share/zfs/test-runner
|
||||
usr/share/zfs/zfs-tests.sh
|
||||
usr/share/zfs/zfs-tests/
|
||||
usr/share/zfs/zfs.sh
|
||||
usr/share/zfs/zimport.sh
|
||||
usr/share/zfs/zloop.sh
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
arch-dependent-file-in-usr-share
|
||||
script-not-executable usr/share/zfs/common.sh
|
||||
command-in-sbin-has-manpage-in-incorrect-section
|
||||
arch-dep-package-has-big-usr-share
|
||||
manpage-without-executable
|
||||
national-encoding usr/share/zfs/zfs-tests/tests/functional/channel_program/lua_core/tst.lib_table.lua
|
||||
executable-not-elf-or-script usr/share/zfs/zfs-tests/tests/functional/cli_root/zfs_jail/jail.conf
|
||||
script-not-executable usr/share/zfs/zfs-tests/include/default.cfg
|
||||
script-not-executable usr/share/zfs/zfs-tests/tests/functional/cli_root/zfs_wait/zfs_wait.kshlib
|
||||
script-not-executable usr/share/zfs/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait.kshlib
|
||||
script-not-executable usr/share/zfs/zfs-tests/tests/functional/persist_l2arc/persist_l2arc.cfg
|
||||
script-not-executable usr/share/zfs/zfs-tests/tests/functional/redacted_send/redacted.kshlib
|
||||
package-contains-documentation-outside-usr-share-doc usr/share/zfs/zfs-tests/*
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
etc/zfs/zed.d/*
|
||||
lib/systemd/system/zfs-zed.service
|
||||
usr/lib/zfs-linux/zed.d/*
|
||||
usr/sbin/zed
|
||||
usr/share/man/man8/zed.8
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
|
||||
script-not-executable
|
||||
# https://github.com/zfsonlinux/zfs/issues/8064
|
||||
systemd-service-file-refers-to-unusual-wantedby-target
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
zedd="/usr/lib/zfs-linux/zed.d"
|
||||
etcd="/etc/zfs/zed.d"
|
||||
|
||||
# enable all default zedlets that are not overridden
|
||||
while read -r file ; do
|
||||
etcfile="${etcd}/${file}"
|
||||
[ -e "${etcfile}" ] && continue
|
||||
ln -sfT "${zedd}/${file}" "${etcfile}"
|
||||
done < "${zedd}/DEFAULT-ENABLED"
|
||||
|
||||
# remove the overrides created in prerm
|
||||
find "${etcd}" -maxdepth 1 -lname '/dev/null' -delete
|
||||
# remove any dangling symlinks to old zedlets
|
||||
find "${etcd}" -maxdepth 1 -lname "${zedd}/*" -xtype l -delete
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
zedd="/usr/lib/zfs-linux/zed.d"
|
||||
etcd="/etc/zfs/zed.d"
|
||||
|
||||
if [ "$1" = "purge" ] && [ -d "$etcd" ] ; then
|
||||
# remove the overrides created in prerm
|
||||
find "${etcd}" -maxdepth 1 -lname '/dev/null' -delete
|
||||
# remove any dangling symlinks to old zedlets
|
||||
find "${etcd}" -maxdepth 1 -lname "${zedd}/*" -xtype l -delete
|
||||
# clean up any empty directories
|
||||
( rmdir "$etcd" && rmdir "/etc/zfs" ) || true
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
zedd="/usr/lib/zfs-linux/zed.d"
|
||||
etcd="/etc/zfs/zed.d"
|
||||
|
||||
if [ "$1" != "failed-upgrade" ] && [ -d "${etcd}" ] && [ -d "${zedd}" ] ; then
|
||||
while read -r file ; do
|
||||
etcfile="${etcd}/${file}"
|
||||
( [ -L "${etcfile}" ] || [ -e "${etcfile}" ] ) && continue
|
||||
ln -sT /dev/null "${etcfile}"
|
||||
done < "${zedd}/DEFAULT-ENABLED"
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
|
||||
# TRIM the first Sunday of every month.
|
||||
24 0 1-7 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/trim ]; then /usr/lib/zfs-linux/trim; fi
|
||||
|
||||
# Scrub the second Sunday of every month.
|
||||
24 0 8-14 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/scrub ]; then /usr/lib/zfs-linux/scrub; fi
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
COPYRIGHT
|
||||
LICENSE
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
etc/zfs/vdev_id.conf.alias.example
|
||||
etc/zfs/vdev_id.conf.multipath.example
|
||||
etc/zfs/vdev_id.conf.sas_direct.example
|
||||
etc/zfs/vdev_id.conf.sas_switch.example
|
||||
etc/zfs/vdev_id.conf.scsi.example
|
||||
Vendored
+120
@@ -0,0 +1,120 @@
|
||||
../tree/zfsutils-linux/* /
|
||||
etc/default/zfs
|
||||
etc/zfs/zfs-functions
|
||||
etc/zfs/zpool.d/
|
||||
lib/systemd/system-preset/
|
||||
lib/systemd/system/zfs-import-cache.service
|
||||
lib/systemd/system/zfs-import-scan.service
|
||||
lib/systemd/system/zfs-import@.service
|
||||
lib/systemd/system/zfs-import.target
|
||||
lib/systemd/system/zfs-import.service
|
||||
lib/systemd/system/zfs-mount.service
|
||||
lib/systemd/system/zfs-share.service
|
||||
lib/systemd/system/zfs-volume-wait.service
|
||||
lib/systemd/system/zfs-volumes.target
|
||||
lib/systemd/system/zfs.target
|
||||
lib/systemd/system-generators/zfs-mount-generator
|
||||
lib/udev/
|
||||
sbin/fsck.zfs
|
||||
sbin/mount.zfs
|
||||
sbin/zdb
|
||||
sbin/zfs
|
||||
sbin/zfs_ids_to_path
|
||||
sbin/zgenhostid
|
||||
sbin/zhack
|
||||
sbin/zpool
|
||||
sbin/zstream
|
||||
sbin/zstreamdump
|
||||
usr/bin/zvol_wait
|
||||
usr/lib/modules-load.d/ lib/
|
||||
usr/lib/zfs-linux/zpool.d/
|
||||
usr/sbin/arc_summary
|
||||
usr/sbin/arcstat
|
||||
usr/sbin/dbufstat
|
||||
usr/share/bash-completion/completions
|
||||
usr/share/man/man8/arcstat.8
|
||||
usr/share/man/man1/zhack.1
|
||||
usr/share/man/man1/zvol_wait.1
|
||||
usr/share/man/man5/
|
||||
usr/share/man/man8/fsck.zfs.8
|
||||
usr/share/man/man8/mount.zfs.8
|
||||
usr/share/man/man8/vdev_id.8
|
||||
usr/share/man/man8/zdb.8
|
||||
usr/share/man/man8/zfs-allow.8
|
||||
usr/share/man/man8/zfs-bookmark.8
|
||||
usr/share/man/man8/zfs-change-key.8
|
||||
usr/share/man/man8/zfs-clone.8
|
||||
usr/share/man/man8/zfs-create.8
|
||||
usr/share/man/man8/zfs-destroy.8
|
||||
usr/share/man/man8/zfs-diff.8
|
||||
usr/share/man/man8/zfs-get.8
|
||||
usr/share/man/man8/zfs-groupspace.8
|
||||
usr/share/man/man8/zfs-hold.8
|
||||
usr/share/man/man8/zfs-inherit.8
|
||||
usr/share/man/man8/zfs-jail.8
|
||||
usr/share/man/man8/zfs-list.8
|
||||
usr/share/man/man8/zfs-load-key.8
|
||||
usr/share/man/man8/zfs-mount-generator.8
|
||||
usr/share/man/man8/zfs-mount.8
|
||||
usr/share/man/man8/zfs-program.8
|
||||
usr/share/man/man8/zfs-project.8
|
||||
usr/share/man/man8/zfs-projectspace.8
|
||||
usr/share/man/man8/zfs-promote.8
|
||||
usr/share/man/man8/zfs-receive.8
|
||||
usr/share/man/man8/zfs-recv.8
|
||||
usr/share/man/man8/zfs-redact.8
|
||||
usr/share/man/man8/zfs-release.8
|
||||
usr/share/man/man8/zfs-rename.8
|
||||
usr/share/man/man8/zfs-rollback.8
|
||||
usr/share/man/man8/zfs-send.8
|
||||
usr/share/man/man8/zfs-set.8
|
||||
usr/share/man/man8/zfs-share.8
|
||||
usr/share/man/man8/zfs-snapshot.8
|
||||
usr/share/man/man8/zfs-unallow.8
|
||||
usr/share/man/man8/zfs-unjail.8
|
||||
usr/share/man/man8/zfs-unload-key.8
|
||||
usr/share/man/man8/zfs-unmount.8
|
||||
usr/share/man/man8/zfs-upgrade.8
|
||||
usr/share/man/man8/zfs-userspace.8
|
||||
usr/share/man/man8/zfs-wait.8
|
||||
usr/share/man/man8/zfs.8
|
||||
usr/share/man/man8/zfs_ids_to_path.8
|
||||
usr/share/man/man8/zfsconcepts.8
|
||||
usr/share/man/man8/zfsprops.8
|
||||
usr/share/man/man8/zgenhostid.8
|
||||
usr/share/man/man8/zpool-add.8
|
||||
usr/share/man/man8/zpool-attach.8
|
||||
usr/share/man/man8/zpool-checkpoint.8
|
||||
usr/share/man/man8/zpool-clear.8
|
||||
usr/share/man/man8/zpool-create.8
|
||||
usr/share/man/man8/zpool-destroy.8
|
||||
usr/share/man/man8/zpool-detach.8
|
||||
usr/share/man/man8/zpool-events.8
|
||||
usr/share/man/man8/zpool-export.8
|
||||
usr/share/man/man8/zpool-get.8
|
||||
usr/share/man/man8/zpool-history.8
|
||||
usr/share/man/man8/zpool-import.8
|
||||
usr/share/man/man8/zpool-initialize.8
|
||||
usr/share/man/man8/zpool-iostat.8
|
||||
usr/share/man/man8/zpool-labelclear.8
|
||||
usr/share/man/man8/zpool-list.8
|
||||
usr/share/man/man8/zpool-offline.8
|
||||
usr/share/man/man8/zpool-online.8
|
||||
usr/share/man/man8/zpool-reguid.8
|
||||
usr/share/man/man8/zpool-remove.8
|
||||
usr/share/man/man8/zpool-reopen.8
|
||||
usr/share/man/man8/zpool-replace.8
|
||||
usr/share/man/man8/zpool-resilver.8
|
||||
usr/share/man/man8/zpool-scrub.8
|
||||
usr/share/man/man8/zpool-set.8
|
||||
usr/share/man/man8/zpool-split.8
|
||||
usr/share/man/man8/zpool-status.8
|
||||
usr/share/man/man8/zpool-sync.8
|
||||
usr/share/man/man8/zpool-trim.8
|
||||
usr/share/man/man8/zpool-upgrade.8
|
||||
usr/share/man/man8/zpool-wait.8
|
||||
usr/share/man/man8/zpool.8
|
||||
usr/share/man/man8/zpoolconcepts.8
|
||||
usr/share/man/man8/zpoolprops.8
|
||||
usr/share/man/man8/zstream.8
|
||||
usr/share/man/man8/zstreamdump.8
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
spare-manual-page
|
||||
systemd-service-file-refers-to-unusual-wantedby-target
|
||||
binary-without-manpage usr/sbin/dbufstat
|
||||
binary-without-manpage usr/sbin/arc_summary
|
||||
manpage-has-errors-from-man
|
||||
appstream-metadata-missing-modalias-provide
|
||||
command-in-sbin-has-manpage-in-incorrect-section
|
||||
package-supports-alternative-init-but-no-init.d-script lib/systemd/system/zfs-import-cache.service
|
||||
package-supports-alternative-init-but-no-init.d-script lib/systemd/system/zfs-import-scan.service
|
||||
spelling-error-in-manpage
|
||||
package-supports-alternative-init-but-no-init.d-script lib/systemd/system/zfs-volume-wait.service
|
||||
systemd-service-file-missing-documentation-key lib/systemd/system/zfs-volume-wait.service
|
||||
extra-license-file usr/share/doc/zfsutils-linux/LICENSE.gz
|
||||
package-supports-alternative-init-but-no-init.d-script lib/systemd/system/zfs-load-module.service
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
# The hostname and hostid of the last system to access a ZFS pool are stored in
|
||||
# the ZFS pool itself. A pool is foreign if, during `zpool import`, the
|
||||
# current hostname and hostid are different than the stored values thereof.
|
||||
#
|
||||
# The only way of having a stable hostid is to define it in /etc/hostid.
|
||||
# This postinst helper will check if we already have the hostid stabilized by
|
||||
# checking the existence of the file /etc/hostid to be 4 bytes at least.
|
||||
# If this file don't already exists on our system or has less than 4 bytes, then
|
||||
# a new (random) value is generated with zgenhostid (8) and stored in
|
||||
# /etc/hostid
|
||||
|
||||
if [ ! -f /etc/hostid ] || [ "$(stat -c %s /etc/hostid)" -lt 4 ] ; then
|
||||
zgenhostid
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
spl-linux (0.7.11-pve1~bpo1) unstable; urgency=medium
|
||||
|
||||
* update SPL to 0.7.11
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 10 Sep 2018 15:47:06 +0200
|
||||
|
||||
spl-linux (0.7.9-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update SPL to 0.7.9
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 18 May 2018 13:49:09 +0200
|
||||
|
||||
spl-linux (0.7.8-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update SPL to 0.7.8 (no changes)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 30 Apr 2018 13:47:22 +0200
|
||||
|
||||
spl-linux (0.7.7-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update SPL to 0.7.7
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 3 Apr 2018 14:28:35 +0200
|
||||
|
||||
spl-linux (0.7.6-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update SPL to 0.7.6
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 21 Feb 2018 09:47:54 +0100
|
||||
|
||||
spl-linux (0.7.4-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update SPL to 0.7.4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 19 Dec 2017 12:52:42 +0100
|
||||
|
||||
spl-linux (0.7.3-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update spl to 0.7.3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 6 Nov 2017 09:14:19 +0100
|
||||
|
||||
spl-linux (0.7.2-pve1~bpo90) unstable; urgency=medium
|
||||
|
||||
* update spl to 0.7.2
|
||||
|
||||
* clean up man pages
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 12 Oct 2017 13:33:04 +0200
|
||||
|
||||
spl-linux (0.6.5.11-pve10~bpo90) unstable; urgency=medium
|
||||
|
||||
* update spl to debian/0.6.5.11-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 27 Jul 2017 13:11:45 +0200
|
||||
|
||||
spl-linux (0.6.5.9-pve9~bpo90) unstable; urgency=medium
|
||||
|
||||
* rebuild for PVE 5.0 / Debian Stretch
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 10 Mar 2017 09:45:52 +0100
|
||||
|
||||
spl-linux (0.6.5.9-pve8~bpo80) unstable; urgency=medium
|
||||
|
||||
* update spl to debian/0.6.5.9-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 6 Feb 2017 12:39:35 +0100
|
||||
|
||||
spl-linux (0.6.5.8-pve7~bpo80) unstable; urgency=medium
|
||||
|
||||
* update spl to debian/0.6.5.8-2
|
||||
|
||||
* switch package upstream sources to Debian (Jessie)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 12 Oct 2016 11:16:02 +0200
|
||||
|
||||
spl-linux (0.6.5.7-pve6~bpo80) unstable; urgency=medium
|
||||
|
||||
* update pkg-spl to jessie/0.6.5.7-5
|
||||
|
||||
* change package versioning to allow upgrades from PVE3/wheezy
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 28 Jun 2016 09:50:00 +0200
|
||||
|
||||
spl-linux (0.6.5-pve5~jessie) unstable; urgency=medium
|
||||
|
||||
* Update pkg-spl to jessie/0.6.5.6-3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 15 Apr 2016 11:11:59 +0200
|
||||
|
||||
spl-linux (0.6.5-pve4~jessie) unstable; urgency=medium
|
||||
|
||||
* update to 0.6.5.6
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 30 Mar 2016 10:49:49 +0200
|
||||
|
||||
spl-linux (0.6.5-pve3~jessie) unstable; urgency=medium
|
||||
|
||||
* update to 0.6.5.4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 14 Jan 2016 11:00:40 +0100
|
||||
|
||||
spl-linux (0.6.5-pve2~jessie) unstable; urgency=medium
|
||||
|
||||
* update to 0.6.5.3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 04 Nov 2015 17:40:58 +0100
|
||||
|
||||
spl-linux (0.6.5-pve1~jessie) unstable; urgency=medium
|
||||
|
||||
* update to master/debian/jessie/0.6.5-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 21 Sep 2015 10:04:23 +0200
|
||||
|
||||
spl-linux (0.6.4-pve3~jessie) unstable; urgency=medium
|
||||
|
||||
* update to snapshot/debian/jessie/0.6.4-8-8ac6ff
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 24 Aug 2015 06:14:12 +0200
|
||||
|
||||
spl-linux (0.6.4-pve2~jessie) unstable; urgency=medium
|
||||
|
||||
* update to 0.6.4.2 (snapshot/debian/jessie/0.6.4-6-37d7cd)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 21 Jul 2015 11:02:31 +0200
|
||||
|
||||
spl-linux (0.6.4-pve1~jessie) unstable; urgency=medium
|
||||
|
||||
* update to 0.6.4 (use upstream zol package definitions)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 14 Apr 2015 10:17:26 +0200
|
||||
|
||||
spl-linux (0.6.3-pve1~jessie) unstable; urgency=medium
|
||||
|
||||
* recompile for jessie
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 28 Feb 2015 16:03:01 +0100
|
||||
|
||||
spl-linux (0.6.3-pve1~wheezy) unstable; urgency=low
|
||||
|
||||
* first version for Proxmox VE
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 10 Jan 2015 14:06:34 +0100
|
||||
|
||||
-1
Submodule spl-debian deleted from e6b66753ff
@@ -1,170 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
|
||||
Date: Wed, 12 Oct 2016 10:57:39 +0200
|
||||
Subject: [PATCH] remove DKMS and module build
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
debian/control | 1 -
|
||||
debian/control.in | 31 -------------------------
|
||||
debian/rules | 68 +------------------------------------------------------
|
||||
3 files changed, 1 insertion(+), 99 deletions(-)
|
||||
|
||||
diff --git a/debian/control b/debian/control
|
||||
index 07db14a..01387e5 100644
|
||||
--- a/debian/control
|
||||
+++ b/debian/control
|
||||
@@ -8,7 +8,6 @@ Build-Depends: autogen,
|
||||
autotools-dev,
|
||||
debhelper (>= 9),
|
||||
dh-autoreconf,
|
||||
- dkms (>> 2.2.0.2-1~),
|
||||
libtool
|
||||
Standards-Version: 4.1.2
|
||||
Homepage: http://www.zfsonlinux.org/
|
||||
diff --git a/debian/control.in b/debian/control.in
|
||||
index 91242a1..5fd81aa 100644
|
||||
--- a/debian/control.in
|
||||
+++ b/debian/control.in
|
||||
@@ -8,47 +8,16 @@ Build-Depends: autogen,
|
||||
autotools-dev,
|
||||
debhelper (>= 9),
|
||||
dh-autoreconf,
|
||||
- dkms (>> 2.2.0.2-1~),
|
||||
libtool
|
||||
Standards-Version: 4.1.2
|
||||
Homepage: http://www.zfsonlinux.org/
|
||||
Vcs-Git: git@salsa.debian.org:zfsonlinux-team/spl.git
|
||||
Vcs-Browser: https://salsa.debian.org/zfsonlinux-team/spl
|
||||
|
||||
-Package: spl-dkms
|
||||
-Architecture: all
|
||||
-Depends: dkms (>> 2.2.1.0),
|
||||
- file,
|
||||
- libc-dev,
|
||||
- libelf-dev,
|
||||
- lsb-release,
|
||||
- ${misc:Depends}
|
||||
-Suggests: spl (>= ${source:Upstream-Version}),
|
||||
- @LINUX_COMPAT@
|
||||
-Conflicts: spl (<< 0.7.9~)
|
||||
-Provides: spl-modules
|
||||
-Description: Solaris Porting Layer kernel modules for Linux
|
||||
- The Solaris Porting Layer (SPL) is a Linux kernel module which provides
|
||||
- many of the Solaris kernel APIs. This shim layer makes it possible to
|
||||
- run Solaris kernel code in the Linux kernel with relatively minimal
|
||||
- modification. The Solaris Porting LAyer Tests (SPLAT) is a Linux kernel
|
||||
- module which provides a testing harness for the SPL module.
|
||||
- .
|
||||
- SPL can be particularly useful when you want to track upstream Illumos
|
||||
- (or any other OpenSolaris fork) development closely and don't want the
|
||||
- overhead of maintaining a large patch which converts Solaris primitives
|
||||
- to Linux primitives.
|
||||
- .
|
||||
- This package contains the source code for the SPL and SPLAT Linux kernel
|
||||
- modules, which can be used with DKMS, so that local kernel modules are
|
||||
- automatically built and installed every time the kernel packages are
|
||||
- upgraded.
|
||||
-
|
||||
Package: spl
|
||||
Architecture: linux-any
|
||||
Conflicts: spl-dev, splat
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
-Recommends: spl-modules | spl-dkms
|
||||
Description: Solaris Porting Layer user-space utilities for Linux
|
||||
The Solaris Porting Layer (SPL) is a Linux kernel module which provides
|
||||
many of the Solaris kernel APIs. This shim layer makes it possible to
|
||||
diff --git a/debian/rules b/debian/rules
|
||||
index 3a12abc..8dca8fd 100755
|
||||
--- a/debian/rules
|
||||
+++ b/debian/rules
|
||||
@@ -14,12 +14,8 @@ ifndef KVERS
|
||||
KVERS=$(shell uname -r)
|
||||
endif
|
||||
|
||||
-non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
|
||||
-PACKAGE=spl
|
||||
-pmodules = $(PACKAGE)-modules-$(non_epoch_version)
|
||||
-
|
||||
%:
|
||||
- dh $@ --with dkms,autoreconf --parallel
|
||||
+ dh $@ --with autoreconf --parallel
|
||||
|
||||
override_dh_auto_configure:
|
||||
sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control
|
||||
@@ -45,69 +41,7 @@ override_dh_auto_install:
|
||||
@# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
|
||||
$(MAKE) distdir
|
||||
|
||||
- @# This shunt allows DKMS to install the Module.symvers and spl_config.h
|
||||
- @# files to the ${dkms_tree} area through the POST_INSTALL directive.
|
||||
- echo '#!/bin/sh' >'$(CURDIR)/$(NAME)-$(VERSION)/cp'
|
||||
- echo 'cp "$$@"' >>'$(CURDIR)/$(NAME)-$(VERSION)/cp'
|
||||
- chmod 755 '$(CURDIR)/$(NAME)-$(VERSION)/cp'
|
||||
-
|
||||
- # Install the DKMS source.
|
||||
- mkdir -p '$(CURDIR)/debian/tmp/usr/src/'
|
||||
- mv '$(CURDIR)/$(NAME)-$(VERSION)' '$(CURDIR)/debian/tmp/usr/src/'
|
||||
-
|
||||
-override_dh_dkms:
|
||||
- dh_dkms -V $(VERSION)
|
||||
-
|
||||
override_dh_auto_clean:
|
||||
dh_auto_clean
|
||||
@if test -e META.orig; then mv META.orig META; fi
|
||||
sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control
|
||||
-
|
||||
-# ------------
|
||||
-
|
||||
-override_dh_prep-deb-files:
|
||||
- for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
|
||||
- sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g' \
|
||||
- < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
|
||||
- done
|
||||
- sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g' \
|
||||
- < debian/control.modules.in > debian/control
|
||||
-
|
||||
-override_dh_configure_modules: override_dh_configure_modules_stamp
|
||||
-override_dh_configure_modules_stamp:
|
||||
- ./configure --with-config=kernel --with-linux=$(KSRC) \
|
||||
- --with-linux-obj=$(KOBJ) \
|
||||
- --disable-debug-kmem
|
||||
- touch override_dh_configure_modules_stamp
|
||||
-
|
||||
-override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules
|
||||
- dh_testdir
|
||||
- dh_testroot
|
||||
- dh_prep
|
||||
-
|
||||
- $(MAKE) -C $(CURDIR)/module modules
|
||||
-
|
||||
- dh_installdirs -p${pmodules}-di
|
||||
- dh_install -p${pmodules}-di
|
||||
- dh_gencontrol -p${pmodules}-di
|
||||
-
|
||||
- dh_builddeb -p${pmodules}-di
|
||||
-
|
||||
-override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
|
||||
- dh_testdir
|
||||
- dh_testroot
|
||||
- dh_prep
|
||||
-
|
||||
- $(MAKE) -C $(CURDIR)/module modules
|
||||
-
|
||||
- dh_installdocs -p${pmodules}
|
||||
- dh_install -p${pmodules}
|
||||
- dh_installchangelogs -p${pmodules}
|
||||
- dh_compress -p${pmodules}
|
||||
- dh_strip -p${pmodules}
|
||||
- dh_fixperms -p${pmodules}
|
||||
- dh_installdeb -p${pmodules}
|
||||
- dh_gencontrol -p${pmodules}
|
||||
- dh_md5sums -p${pmodules}
|
||||
-
|
||||
- dh_builddeb -p${pmodules}
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -1,178 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Sun, 12 Aug 2018 18:22:54 -0400
|
||||
Subject: [PATCH] Linux 4.18 compat: inode timespec -> timespec64
|
||||
|
||||
Commit torvalds/linux@95582b0 changes the inode i_atime, i_mtime,
|
||||
and i_ctime members form timespec's to timespec64's to make them
|
||||
2038 safe. As part of this change the current_time() function was
|
||||
also updated to return the timespec64 type.
|
||||
|
||||
Resolve this issue by introducing a new inode_timespec_t type which
|
||||
is defined to match the timespec type used by the inode. It should
|
||||
be used when working with inode timestamps to ensure matching types.
|
||||
|
||||
The timestruc_t type under Illumos was used in a similar fashion but
|
||||
was specified to always be a timespec_t. Rather than incorrectly
|
||||
define this type all timespec_t types have been replaced by the new
|
||||
inode_timespec_t type.
|
||||
|
||||
Finally, the kernel and user space 'sys/time.h' headers were aligned
|
||||
with each other. They define as appropriate for the context several
|
||||
constants as macros and include static inline implementation of
|
||||
gethrestime(), gethrestime_sec(), and gethrtime().
|
||||
|
||||
Reviewed-by: Chunwei Chen <tuxoko@gmail.com>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #7643
|
||||
Backported-by: Richard Yao <ryao@gentoo.org>
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
config/kernel-inode-times.m4 | 25 +++++++++++++++++++++++++
|
||||
config/spl-build.m4 | 1 +
|
||||
include/sys/condvar.h | 1 +
|
||||
include/sys/time.h | 25 +++++++++++++++++++------
|
||||
include/sys/types.h | 3 ---
|
||||
include/sys/vnode.h | 6 +++---
|
||||
6 files changed, 49 insertions(+), 12 deletions(-)
|
||||
create mode 100644 config/kernel-inode-times.m4
|
||||
|
||||
diff --git a/config/kernel-inode-times.m4 b/config/kernel-inode-times.m4
|
||||
new file mode 100644
|
||||
index 0000000..3a6acd8
|
||||
--- /dev/null
|
||||
+++ b/config/kernel-inode-times.m4
|
||||
@@ -0,0 +1,25 @@
|
||||
+dnl #
|
||||
+dnl # 4.18 API change
|
||||
+dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64.
|
||||
+dnl #
|
||||
+AC_DEFUN([SPL_AC_KERNEL_INODE_TIMES], [
|
||||
+ AC_MSG_CHECKING([whether inode->i_*time's are timespec64])
|
||||
+ tmp_flags="$EXTRA_KCFLAGS"
|
||||
+ EXTRA_KCFLAGS="-Werror"
|
||||
+ SPL_LINUX_TRY_COMPILE([
|
||||
+ #include <linux/fs.h>
|
||||
+ ],[
|
||||
+ struct inode ip;
|
||||
+ struct timespec ts;
|
||||
+
|
||||
+ memset(&ip, 0, sizeof(ip));
|
||||
+ ts = ip.i_mtime;
|
||||
+ ],[
|
||||
+ AC_MSG_RESULT(no)
|
||||
+ ],[
|
||||
+ AC_MSG_RESULT(yes)
|
||||
+ AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1,
|
||||
+ [inode->i_*time's are timespec64])
|
||||
+ ])
|
||||
+ EXTRA_KCFLAGS="$tmp_flags"
|
||||
+])
|
||||
diff --git a/config/spl-build.m4 b/config/spl-build.m4
|
||||
index 5c6c02a..0dc5be8 100644
|
||||
--- a/config/spl-build.m4
|
||||
+++ b/config/spl-build.m4
|
||||
@@ -43,6 +43,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
|
||||
SPL_AC_2ARGS_VFS_GETATTR
|
||||
SPL_AC_USLEEP_RANGE
|
||||
SPL_AC_KMEM_CACHE_ALLOCFLAGS
|
||||
+ SPL_AC_KERNEL_INODE_TIMES
|
||||
SPL_AC_WAIT_ON_BIT
|
||||
SPL_AC_INODE_LOCK
|
||||
SPL_AC_GROUP_INFO_GID
|
||||
diff --git a/include/sys/condvar.h b/include/sys/condvar.h
|
||||
index 5fcc906..ce3149a 100644
|
||||
--- a/include/sys/condvar.h
|
||||
+++ b/include/sys/condvar.h
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <sys/kmem.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/callo.h>
|
||||
+#include <sys/time.h>
|
||||
|
||||
/*
|
||||
* The kcondvar_t struct is protected by mutex taken externally before
|
||||
diff --git a/include/sys/time.h b/include/sys/time.h
|
||||
index ddda6de..59557af 100644
|
||||
--- a/include/sys/time.h
|
||||
+++ b/include/sys/time.h
|
||||
@@ -52,15 +52,28 @@
|
||||
#define NSEC2SEC(n) ((n) / (NANOSEC / SEC))
|
||||
#define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC))
|
||||
|
||||
+typedef longlong_t hrtime_t;
|
||||
+typedef struct timespec timespec_t;
|
||||
+
|
||||
static const int hz = HZ;
|
||||
|
||||
#define TIMESPEC_OVERFLOW(ts) \
|
||||
((ts)->tv_sec < TIME_MIN || (ts)->tv_sec > TIME_MAX)
|
||||
|
||||
+#if defined(HAVE_INODE_TIMESPEC64_TIMES)
|
||||
+typedef struct timespec64 inode_timespec_t;
|
||||
+#else
|
||||
+typedef struct timespec inode_timespec_t;
|
||||
+#endif
|
||||
+
|
||||
static inline void
|
||||
-gethrestime(timestruc_t *now)
|
||||
-{
|
||||
- *now = current_kernel_time();
|
||||
+gethrestime(inode_timespec_t *ts)
|
||||
+ {
|
||||
+#if defined(HAVE_INODE_TIMESPEC64_TIMES)
|
||||
+ *ts = current_kernel_time64();
|
||||
+#else
|
||||
+ *ts = current_kernel_time();
|
||||
+#endif
|
||||
}
|
||||
|
||||
static inline time_t
|
||||
@@ -74,9 +87,9 @@ gethrestime_sec(void)
|
||||
static inline hrtime_t
|
||||
gethrtime(void)
|
||||
{
|
||||
- struct timespec now;
|
||||
- getrawmonotonic(&now);
|
||||
- return (((hrtime_t)now.tv_sec * NSEC_PER_SEC) + now.tv_nsec);
|
||||
+ struct timespec ts;
|
||||
+ getrawmonotonic(&ts);
|
||||
+ return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec);
|
||||
}
|
||||
|
||||
#endif /* _SPL_TIME_H */
|
||||
diff --git a/include/sys/types.h b/include/sys/types.h
|
||||
index 2fe63b7..b958462 100644
|
||||
--- a/include/sys/types.h
|
||||
+++ b/include/sys/types.h
|
||||
@@ -49,9 +49,6 @@ typedef long long offset_t;
|
||||
typedef struct task_struct kthread_t;
|
||||
typedef struct task_struct proc_t;
|
||||
typedef short pri_t;
|
||||
-typedef struct timespec timestruc_t; /* definition per SVr4 */
|
||||
-typedef struct timespec timespec_t;
|
||||
-typedef longlong_t hrtime_t;
|
||||
typedef unsigned short ushort_t;
|
||||
typedef u_longlong_t len_t;
|
||||
typedef longlong_t diskaddr_t;
|
||||
diff --git a/include/sys/vnode.h b/include/sys/vnode.h
|
||||
index 0ed4794..87f12d6 100644
|
||||
--- a/include/sys/vnode.h
|
||||
+++ b/include/sys/vnode.h
|
||||
@@ -129,9 +129,9 @@ typedef struct vattr {
|
||||
long va_nodeid; /* node # */
|
||||
uint32_t va_nlink; /* # links */
|
||||
uint64_t va_size; /* file size */
|
||||
- struct timespec va_atime; /* last acc */
|
||||
- struct timespec va_mtime; /* last mod */
|
||||
- struct timespec va_ctime; /* last chg */
|
||||
+ inode_timespec_t va_atime; /* last acc */
|
||||
+ inode_timespec_t va_mtime; /* last mod */
|
||||
+ inode_timespec_t va_ctime; /* last chg */
|
||||
dev_t va_rdev; /* dev */
|
||||
uint64_t va_nblocks; /* space used */
|
||||
uint32_t va_blksize; /* block size */
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Hutter <hutter2@llnl.gov>
|
||||
Date: Wed, 15 Aug 2018 09:39:55 -0700
|
||||
Subject: [PATCH] Add pool state /proc entry, "SUSPENDED" pools (SPL)
|
||||
|
||||
(This is the SPL backported code from f0ed6c744)
|
||||
|
||||
1. Add a proc entry to display the pool's state:
|
||||
|
||||
$ cat /proc/spl/kstat/zfs/tank/state
|
||||
ONLINE
|
||||
|
||||
This is done without using the spa config locks, so it will
|
||||
never hang.
|
||||
|
||||
2. Fix 'zpool status' and 'zpool list -o health' output to print
|
||||
"SUSPENDED" instead of "ONLINE" for suspended pools.
|
||||
|
||||
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
|
||||
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
|
||||
Closes #7331
|
||||
Closes #7563
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
include/sys/kstat.h | 2 +-
|
||||
module/spl/spl-kstat.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/include/sys/kstat.h b/include/sys/kstat.h
|
||||
index 2018019..b8aa7ed 100644
|
||||
--- a/include/sys/kstat.h
|
||||
+++ b/include/sys/kstat.h
|
||||
@@ -72,7 +72,7 @@
|
||||
#define KSTAT_FLAG_UNSUPPORTED \
|
||||
(KSTAT_FLAG_VAR_SIZE | KSTAT_FLAG_WRITABLE | \
|
||||
KSTAT_FLAG_PERSISTENT | KSTAT_FLAG_DORMANT)
|
||||
-
|
||||
+#define KSTAT_FLAG_NO_HEADERS 0x80
|
||||
|
||||
#define KS_MAGIC 0x9d9d9d9d
|
||||
|
||||
diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c
|
||||
index 6970fcc..f9b9015 100644
|
||||
--- a/module/spl/spl-kstat.c
|
||||
+++ b/module/spl/spl-kstat.c
|
||||
@@ -388,7 +388,8 @@ kstat_seq_start(struct seq_file *f, loff_t *pos)
|
||||
|
||||
ksp->ks_snaptime = gethrtime();
|
||||
|
||||
- if (!n && kstat_seq_show_headers(f))
|
||||
+ if (!(ksp->ks_flags & KSTAT_FLAG_NO_HEADERS) && !n &&
|
||||
+ kstat_seq_show_headers(f))
|
||||
return (NULL);
|
||||
|
||||
if (n >= ksp->ks_ndata)
|
||||
@@ -538,7 +539,6 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name,
|
||||
ASSERT(ks_module);
|
||||
ASSERT(ks_instance == 0);
|
||||
ASSERT(ks_name);
|
||||
- ASSERT(!(ks_flags & KSTAT_FLAG_UNSUPPORTED));
|
||||
|
||||
if ((ks_type == KSTAT_TYPE_INTR) || (ks_type == KSTAT_TYPE_IO))
|
||||
ASSERT(ks_ndata == 1);
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Hutter <hutter2@llnl.gov>
|
||||
Date: Wed, 15 Aug 2018 11:58:54 -0700
|
||||
Subject: [PATCH] Add rwsem_tryupgrade for 4.9.20-rt16 kernel (SPL)
|
||||
|
||||
(This is the SPL backported code from 11d0525cb)
|
||||
|
||||
The RT rwsem implementation was changed to allow multiple readers
|
||||
as of the 4.9.20-rt16 patch set. This results in a build failure
|
||||
because the existing implementation was forced to directly access
|
||||
the rwsem structure which has changed.
|
||||
|
||||
While this could be accommodated by adding additional compatibility
|
||||
code. This patch resolves the build issue by simply assuming the
|
||||
rwsem can never be upgraded. This functionality is a performance
|
||||
optimization and all callers must already handle this case.
|
||||
|
||||
Converting the last remaining use of __SPIN_LOCK_UNLOCKED to
|
||||
spin_lock_init() was additionally required to get a clean build.
|
||||
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #7589
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
include/sys/isa_defs.h | 8 ++++++++
|
||||
include/sys/rwlock.h | 10 +++++-----
|
||||
module/spl/spl-rwlock.c | 19 ++++++++++++++-----
|
||||
module/spl/spl-vnode.c | 2 ++
|
||||
4 files changed, 29 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h
|
||||
index 5559782..13dcb35 100644
|
||||
--- a/include/sys/isa_defs.h
|
||||
+++ b/include/sys/isa_defs.h
|
||||
@@ -210,6 +210,14 @@
|
||||
|
||||
#include <sys/byteorder.h>
|
||||
|
||||
+/*
|
||||
+ * CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS will be defined by the Linux
|
||||
+ * kernel for architectures which support efficient unaligned access.
|
||||
+ */
|
||||
+#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)
|
||||
+#define HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
+#endif
|
||||
+
|
||||
#if defined(__LITTLE_ENDIAN) && !defined(_LITTLE_ENDIAN)
|
||||
#define _LITTLE_ENDIAN __LITTLE_ENDIAN
|
||||
#endif
|
||||
diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h
|
||||
index 325dfc4..2699229 100644
|
||||
--- a/include/sys/rwlock.h
|
||||
+++ b/include/sys/rwlock.h
|
||||
@@ -135,7 +135,7 @@ RW_LOCK_HELD(krwlock_t *rwp)
|
||||
}
|
||||
|
||||
/*
|
||||
- * The following functions must be a #define and not static inline.
|
||||
+ * The following functions must be a #define and not static inline.
|
||||
* This ensures that the native linux semaphore functions (down/up)
|
||||
* will be correctly located in the users code which is important
|
||||
* for the built in kernel lock analysis tools
|
||||
@@ -151,10 +151,10 @@ RW_LOCK_HELD(krwlock_t *rwp)
|
||||
spl_rw_set_type(rwp, type); \
|
||||
})
|
||||
|
||||
-#define rw_destroy(rwp) \
|
||||
-({ \
|
||||
- VERIFY(!RW_LOCK_HELD(rwp)); \
|
||||
-})
|
||||
+/*
|
||||
+ * The Linux rwsem implementation does not require a matching destroy.
|
||||
+ */
|
||||
+#define rw_destroy(rwp) ((void) 0)
|
||||
|
||||
#define rw_tryenter(rwp, rw) \
|
||||
({ \
|
||||
diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c
|
||||
index bf7ee2f..ac28c91 100644
|
||||
--- a/module/spl/spl-rwlock.c
|
||||
+++ b/module/spl/spl-rwlock.c
|
||||
@@ -34,16 +34,24 @@
|
||||
static int
|
||||
__rwsem_tryupgrade(struct rw_semaphore *rwsem)
|
||||
{
|
||||
-
|
||||
+#if defined(READER_BIAS) && defined(WRITER_BIAS)
|
||||
+ /*
|
||||
+ * After the 4.9.20-rt16 kernel the realtime patch series lifted the
|
||||
+ * single reader restriction. While this could be accommodated by
|
||||
+ * adding additional compatibility code assume the rwsem can never
|
||||
+ * be upgraded. All caller must already cleanly handle this case.
|
||||
+ */
|
||||
+ return (0);
|
||||
+#else
|
||||
ASSERT((struct task_struct *)
|
||||
((unsigned long)rwsem->lock.owner & ~RT_MUTEX_OWNER_MASKALL) ==
|
||||
current);
|
||||
|
||||
/*
|
||||
- * Under the realtime patch series, rwsem is implemented as a
|
||||
- * single mutex held by readers and writers alike. However,
|
||||
- * this implementation would prevent a thread from taking a
|
||||
- * read lock twice, as the mutex would already be locked on
|
||||
+ * Prior to 4.9.20-rt16 kernel the realtime patch series, rwsem is
|
||||
+ * implemented as a single mutex held by readers and writers alike.
|
||||
+ * However, this implementation would prevent a thread from taking
|
||||
+ * a read lock twice, as the mutex would already be locked on
|
||||
* the second attempt. Therefore the implementation allows a
|
||||
* single thread to take a rwsem as read lock multiple times
|
||||
* tracking that nesting as read_depth counter.
|
||||
@@ -59,6 +67,7 @@ __rwsem_tryupgrade(struct rw_semaphore *rwsem)
|
||||
return (1);
|
||||
}
|
||||
return (0);
|
||||
+#endif
|
||||
}
|
||||
#elif defined(CONFIG_RWSEM_GENERIC_SPINLOCK)
|
||||
static int
|
||||
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
|
||||
index 74ae8fe..cd0015f 100644
|
||||
--- a/module/spl/spl-vnode.c
|
||||
+++ b/module/spl/spl-vnode.c
|
||||
@@ -670,6 +670,8 @@ vn_file_cache_destructor(void *buf, void *cdrarg)
|
||||
int
|
||||
spl_vn_init(void)
|
||||
{
|
||||
+ spin_lock_init(&vn_file_lock);
|
||||
+
|
||||
vn_cache = kmem_cache_create("spl_vn_cache",
|
||||
sizeof (struct vnode), 64, vn_cache_constructor,
|
||||
vn_cache_destructor, NULL, NULL, NULL, 0);
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Hutter <hutter2@llnl.gov>
|
||||
Date: Wed, 5 Sep 2018 10:36:46 -0700
|
||||
Subject: [PATCH] Tag spl-0.7.10
|
||||
|
||||
META file and changelog updated.
|
||||
|
||||
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
META | 2 +-
|
||||
rpm/generic/spl-kmod.spec.in | 3 +++
|
||||
rpm/generic/spl.spec.in | 3 +++
|
||||
3 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/META b/META
|
||||
index 95c9368..7818d34 100644
|
||||
--- a/META
|
||||
+++ b/META
|
||||
@@ -1,7 +1,7 @@
|
||||
Meta: 1
|
||||
Name: spl
|
||||
Branch: 1.0
|
||||
-Version: 0.7.9
|
||||
+Version: 0.7.10
|
||||
Release: 1
|
||||
Release-Tags: relext
|
||||
License: GPL
|
||||
diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in
|
||||
index 9cd2225..f31e31e 100644
|
||||
--- a/rpm/generic/spl-kmod.spec.in
|
||||
+++ b/rpm/generic/spl-kmod.spec.in
|
||||
@@ -167,6 +167,9 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
+* Wed Sep 05 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.10-1
|
||||
+- Released 0.7.10-1, detailed release notes are available at:
|
||||
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.10
|
||||
* Tue May 08 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.9-1
|
||||
- Released 0.7.9-1, detailed release notes are available at:
|
||||
- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.9
|
||||
diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in
|
||||
index 39c6411..7e9ee12 100644
|
||||
--- a/rpm/generic/spl.spec.in
|
||||
+++ b/rpm/generic/spl.spec.in
|
||||
@@ -44,6 +44,9 @@ make install DESTDIR=%{?buildroot}
|
||||
%{_mandir}/man5/*
|
||||
|
||||
%changelog
|
||||
+* Wed Sep 05 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.10-1
|
||||
+- Released 0.7.10-1, detailed release notes are available at:
|
||||
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.10
|
||||
* Tue May 08 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.9-1
|
||||
- Released 0.7.9-1, detailed release notes are available at:
|
||||
- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.9
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Wed, 12 Sep 2018 20:42:34 -0400
|
||||
Subject: [PATCH] Linux 4.18 compat: Kconfig
|
||||
|
||||
The kernel's top level Kconfig was updated in 4.18 such that it
|
||||
no longer matches the expected pattern preventing the spl source
|
||||
from being inserted. Simplify the existing logic to always insert
|
||||
the entry at the end of the file since an exact location is not
|
||||
required, unlike in the Makefile.
|
||||
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Issue #7890
|
||||
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
copy-builtin | 27 +--------------------------
|
||||
1 file changed, 1 insertion(+), 26 deletions(-)
|
||||
|
||||
diff --git a/copy-builtin b/copy-builtin
|
||||
index 34c482b..b8e3a08 100755
|
||||
--- a/copy-builtin
|
||||
+++ b/copy-builtin
|
||||
@@ -88,32 +88,7 @@ EOF
|
||||
done
|
||||
} > "$KERNEL_DIR/spl/Kbuild"
|
||||
|
||||
-add_after()
|
||||
-{
|
||||
- local FILE="$1"
|
||||
- local MARKER="$2"
|
||||
- local NEW="$3"
|
||||
- local LINE
|
||||
-
|
||||
- while IFS='' read -r LINE
|
||||
- do
|
||||
- echo "$LINE"
|
||||
-
|
||||
- if [ -n "$MARKER" -a "$LINE" = "$MARKER" ]
|
||||
- then
|
||||
- echo "$NEW"
|
||||
- MARKER=''
|
||||
- if IFS='' read -r LINE
|
||||
- then
|
||||
- [ "$LINE" != "$NEW" ] && echo "$LINE"
|
||||
- fi
|
||||
- fi
|
||||
- done < "$FILE" > "$FILE.new"
|
||||
-
|
||||
- mv "$FILE.new" "$FILE"
|
||||
-}
|
||||
-
|
||||
-add_after "$KERNEL_DIR/Kconfig" 'source "arch/$SRCARCH/Kconfig"' 'source "spl/Kconfig"'
|
||||
+echo 'source "spl/Kconfig"' >>"$KERNEL_DIR/Kconfig"
|
||||
# We must take care to build SPL before ZFS, otherwise the symbols required
|
||||
# to link ZFS will not be available.
|
||||
sed -i 's~mm/ fs/~mm/ spl/ fs/~' "$KERNEL_DIR/Makefile"
|
||||
@@ -1,56 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Hutter <hutter2@llnl.gov>
|
||||
Date: Thu, 13 Sep 2018 10:13:33 -0700
|
||||
Subject: [PATCH] Tag spl-0.7.11
|
||||
|
||||
META file and changelog updated.
|
||||
|
||||
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
META | 2 +-
|
||||
rpm/generic/spl-kmod.spec.in | 3 +++
|
||||
rpm/generic/spl.spec.in | 3 +++
|
||||
3 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/META b/META
|
||||
index 7818d34..fc98597 100644
|
||||
--- a/META
|
||||
+++ b/META
|
||||
@@ -1,7 +1,7 @@
|
||||
Meta: 1
|
||||
Name: spl
|
||||
Branch: 1.0
|
||||
-Version: 0.7.10
|
||||
+Version: 0.7.11
|
||||
Release: 1
|
||||
Release-Tags: relext
|
||||
License: GPL
|
||||
diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in
|
||||
index f31e31e..4cc1faf 100644
|
||||
--- a/rpm/generic/spl-kmod.spec.in
|
||||
+++ b/rpm/generic/spl-kmod.spec.in
|
||||
@@ -167,6 +167,9 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
+* Thu Sep 13 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.11-1
|
||||
+- Released 0.7.11-1, detailed release notes are available at:
|
||||
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.11
|
||||
* Wed Sep 05 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.10-1
|
||||
- Released 0.7.10-1, detailed release notes are available at:
|
||||
- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.10
|
||||
diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in
|
||||
index 7e9ee12..4b3a3d7 100644
|
||||
--- a/rpm/generic/spl.spec.in
|
||||
+++ b/rpm/generic/spl.spec.in
|
||||
@@ -44,6 +44,9 @@ make install DESTDIR=%{?buildroot}
|
||||
%{_mandir}/man5/*
|
||||
|
||||
%changelog
|
||||
+* Thu Sep 13 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.11-1
|
||||
+- Released 0.7.11-1, detailed release notes are available at:
|
||||
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.11
|
||||
* Wed Sep 05 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.10-1
|
||||
- Released 0.7.10-1, detailed release notes are available at:
|
||||
- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.10
|
||||
@@ -1,7 +0,0 @@
|
||||
0001-remove-DKMS-and-module-build.patch
|
||||
0002-Linux-4.18-compat-inode-timespec-timespec64.patch
|
||||
0003-Add-pool-state-proc-entry-SUSPENDED-pools-SPL.patch
|
||||
0004-Add-rwsem_tryupgrade-for-4.9.20-rt16-kernel-SPL.patch
|
||||
0005-Tag-spl-0.7.10.patch
|
||||
0006-Linux-4.18-compat-Kconfig.patch
|
||||
0007-Tag-spl-0.7.11.patch
|
||||
Submodule
+1
Submodule upstream added at ef686e96ec
@@ -1,257 +0,0 @@
|
||||
zfs-linux (0.7.11-pve1~bpo1) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.11
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 10 Sep 2018 15:47:31 +0200
|
||||
|
||||
zfs-linux (0.7.9-pve3~bpo9) unstable; urgency=medium
|
||||
|
||||
* Cherry-pick fix for deadlock umount/snapentry_expire
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 03 Aug 2018 11:41:11 +0200
|
||||
|
||||
zfs-linux (0.7.9-pve2~bpo9) unstable; urgency=medium
|
||||
|
||||
* Cherry-pick fix for zpl_mount deadlock
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 12 Jul 2018 12:37:50 +0200
|
||||
|
||||
zfs-linux (0.7.9-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.9
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 18 May 2018 13:49:09 +0200
|
||||
|
||||
zfs-linux (0.7.8-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.8 (no changes)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 30 Apr 2018 13:47:22 +0200
|
||||
|
||||
zfs-linux (0.7.7-pve2~bpo9) unstable; urgency=medium
|
||||
|
||||
* (temporarily) revert likely cause of #7401
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 9 Apr 2018 09:49:27 +0200
|
||||
|
||||
zfs-linux (0.7.7-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.7
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 3 Apr 2018 14:28:35 +0200
|
||||
|
||||
zfs-linux (0.7.6-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.6
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 21 Feb 2018 09:48:29 +0100
|
||||
|
||||
zfs-linux (0.7.4-pve2~bpo9) unstable; urgency=medium
|
||||
|
||||
* cherry-pick ARC hit rate fix from 0.7.6
|
||||
|
||||
* always load ZFS modules on boot
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 19 Jan 2018 11:31:14 +0100
|
||||
|
||||
zfs-linux (0.7.4-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 19 Dec 2017 12:52:42 +0100
|
||||
|
||||
zfs-linux (0.7.3-pve1~bpo9) unstable; urgency=medium
|
||||
|
||||
* update ZFS to 0.7.3
|
||||
|
||||
* include fix for user namespace setgid issue (#6800 upstream)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 6 Nov 2017 09:14:19 +0100
|
||||
|
||||
zfs-linux (0.7.2-pve1~bpo90) unstable; urgency=medium
|
||||
|
||||
* update zfs to 0.7.2
|
||||
|
||||
* add PR 6616 - zfs send/recv compatibility with 0.6.5
|
||||
|
||||
* add PR 6695 - zfs recv: don't skip over objects which should be freed
|
||||
|
||||
* various small fixes
|
||||
|
||||
* split test suite into zfs-test package
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 12 Oct 2017 13:34:05 +0200
|
||||
|
||||
zfs-linux (0.6.5.11-pve18~bpo90) unstable; urgency=medium
|
||||
|
||||
* fix #1509: arc_summary error with L2ARC
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 2 Oct 2017 09:30:41 +0200
|
||||
|
||||
zfs-linux (0.6.5.11-pve17~bpo90) unstable; urgency=medium
|
||||
|
||||
* update zfs to debian/0.6.5.11-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 27 Jul 2017 13:11:45 +0200
|
||||
|
||||
zfs-linux (0.6.5.9-pve16~bpo90) unstable; urgency=medium
|
||||
|
||||
* drop transitional packages
|
||||
|
||||
* convert python scripts to python 3, drop .py suffix
|
||||
|
||||
* rebuild for PVE 5.0 / Debian Stretch
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 10 Mar 2017 09:45:52 +0100
|
||||
|
||||
zfs-linux (0.6.5.9-pve15~bpo80) unstable; urgency=medium
|
||||
|
||||
* update zfs to debian/0.6.5.9-1
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 6 Feb 2017 12:39:10 +0100
|
||||
|
||||
zfs-linux (0.6.5.8-pve14~bpo80) unstable; urgency=medium
|
||||
|
||||
* update zfs to debian/0.6.5.8-3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 11 Jan 2017 09:34:58 +0100
|
||||
|
||||
zfs-linux (0.6.5.8-pve13~bpo80) unstable; urgency=medium
|
||||
|
||||
* fix #1184: zfs-share.service has wrong path to 'rm' command
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 27 Oct 2016 11:25:47 +0200
|
||||
|
||||
zfs-linux (0.6.5.8-pve12~bpo80) unstable; urgency=medium
|
||||
|
||||
* import with "-d /dev/disk/by-id" in systemd service
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 24 Oct 2016 13:48:08 +0200
|
||||
|
||||
zfs-linux (0.6.5.8-pve11~bpo80) unstable; urgency=medium
|
||||
|
||||
* update zfs to debian/0.6.5.8-1
|
||||
|
||||
* switch package upstream sources to Debian (Jessie)
|
||||
|
||||
* add transitional packages for upgrades
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 12 Oct 2016 11:16:02 +0200
|
||||
|
||||
zfs-linux (0.6.5.7-pve10~bpo80) unstable; urgency=medium
|
||||
|
||||
* update to pkg-zfs jessie/0.6.5.7-8
|
||||
|
||||
* change package versioning to allow upgrades from PVE3/wheezy
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 28 Jun 2016 09:50:00 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve9~jessie) unstable; urgency=medium
|
||||
|
||||
* Update to pkg-zfs jessie/0.6.5.6-3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 12 Apr 2016 09:51:35 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve8~jessie) unstable; urgency=medium
|
||||
|
||||
* update to zfs-0.6.5.6
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 30 Mar 2016 10:50:22 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve7~jessie) unstable; urgency=medium
|
||||
|
||||
* update to zfs-0.6.5.4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 14 Jan 2016 10:51:17 +0100
|
||||
|
||||
zfs-linux (0.6.5-pve6~jessie) unstable; urgency=medium
|
||||
|
||||
* Prepare to tag zfs-0.6.5.3
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 05 Nov 2015 07:21:44 +0100
|
||||
|
||||
zfs-linux (0.6.5-pve5~jessie) unstable; urgency=medium
|
||||
|
||||
* Illumos 6267 - dn_bonus evicted too early
|
||||
|
||||
* Fix use-after-free in vdev_disk_physio_completion
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 04 Nov 2015 17:42:42 +0100
|
||||
|
||||
zfs-linux (0.6.5-pve4~jessie) unstable; urgency=medium
|
||||
|
||||
* update to master/debian/jessie/0.6.5.2-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 05 Oct 2015 17:56:45 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve3~jessie) unstable; urgency=medium
|
||||
|
||||
* do not install /etc/init.d/zfs-zed script to avoid double startup
|
||||
with systemd
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 28 Sep 2015 10:14:40 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve2~jessie) unstable; urgency=medium
|
||||
|
||||
* update to master/debian/jessie/0.6.5.1-4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 24 Sep 2015 12:45:33 +0200
|
||||
|
||||
zfs-linux (0.6.5-pve1~jessie) unstable; urgency=medium
|
||||
|
||||
* update to master/debian/jessie/0.6.5.1-2
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 21 Sep 2015 10:02:41 +0200
|
||||
|
||||
zfs-linux (0.6.4-pve3~jessie) unstable; urgency=medium
|
||||
|
||||
* update to snapshot/debian/jessie/0.6.4-24-6bec43
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 24 Aug 2015 06:13:44 +0200
|
||||
|
||||
zfs-linux (0.6.4-pve2~jessie) unstable; urgency=medium
|
||||
|
||||
* update to 0.6.4.2 (snapshot/debian/jessie/0.6.4-21-53b1d9)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 21 Jul 2015 11:03:21 +0200
|
||||
|
||||
zfs-linux (0.6.4-pve1~jessie) unstable; urgency=medium
|
||||
|
||||
* update to 0.6.4 (use upstream zol package definitions)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 14 Apr 2015 10:19:22 +0200
|
||||
|
||||
zfs-linux (0.6.3-pve3~jessie) unstable; urgency=medium
|
||||
|
||||
* ignore zfs-import-scan errors
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Tue, 31 Mar 2015 17:52:40 +0200
|
||||
|
||||
zfs-linux (0.6.3-pve2~jessie) unstable; urgency=medium
|
||||
|
||||
* use systemd for service startup
|
||||
|
||||
* install zed configuration file /etc/zfs/zed.d/zed.rc
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sun, 15 Mar 2015 15:52:54 +0100
|
||||
|
||||
zfs-linux (0.6.3-pve1~jessie) unstable; urgency=medium
|
||||
|
||||
* recompile on jessie
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 28 Feb 2015 16:02:08 +0100
|
||||
|
||||
zfs-linux (0.6.3-2~wheezy) unstable; urgency=low
|
||||
|
||||
* use /sbin/modprobe to avoid warning inside initrd
|
||||
|
||||
* fix warning about undefined values inside initrd
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 14 Jan 2015 19:03:04 +0100
|
||||
|
||||
zfs-linux (0.6.3-1~wheezy) unstable; urgency=low
|
||||
|
||||
* first version for Proxmox VE
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Sat, 10 Jan 2015 14:06:34 +0100
|
||||
|
||||
-1
Submodule zfs-debian deleted from b444ee6627
@@ -1,282 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
|
||||
Date: Mon, 6 Feb 2017 11:03:10 +0100
|
||||
Subject: [PATCH] remove DKMS, modules and dracut build
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
debian/control | 1 -
|
||||
debian/control.in | 40 ++-----------------
|
||||
debian/not-installed | 2 +
|
||||
debian/rules | 106 +--------------------------------------------------
|
||||
4 files changed, 7 insertions(+), 142 deletions(-)
|
||||
|
||||
diff --git a/debian/control b/debian/control
|
||||
index 9e4f8fa7..42fbec35 100644
|
||||
--- a/debian/control
|
||||
+++ b/debian/control
|
||||
@@ -9,7 +9,6 @@ Build-Depends: autotools-dev,
|
||||
debhelper (>= 10.2),
|
||||
dh-autoreconf,
|
||||
dh-python,
|
||||
- dkms (>> 2.1.1.2-5),
|
||||
libattr1-dev,
|
||||
libblkid-dev,
|
||||
libselinux1-dev,
|
||||
diff --git a/debian/control.in b/debian/control.in
|
||||
index e193f017..2cb2f614 100644
|
||||
--- a/debian/control.in
|
||||
+++ b/debian/control.in
|
||||
@@ -9,7 +9,6 @@ Build-Depends: autotools-dev,
|
||||
debhelper (>= 10.2),
|
||||
dh-autoreconf,
|
||||
dh-python,
|
||||
- dkms (>> 2.1.1.2-5),
|
||||
libattr1-dev,
|
||||
libblkid-dev,
|
||||
libselinux1-dev,
|
||||
@@ -86,26 +85,10 @@ Description: OpenZFS pool library for Linux
|
||||
.
|
||||
This zpool library provides support for managing zpools.
|
||||
|
||||
-Package: zfs-dkms
|
||||
-Architecture: all
|
||||
-Pre-Depends: spl-dkms (<<${source:Upstream-Version}.),
|
||||
- spl-dkms (>= ${source:Upstream-Version})
|
||||
-Depends: dkms (>> 2.1.1.2-5), lsb-release, ${misc:Depends}
|
||||
-Recommends: zfs-zed, zfsutils-linux (>= ${binary:Version}), @LINUX_COMPAT@
|
||||
-Provides: zfs-modules
|
||||
-Description: OpenZFS filesystem kernel modules for Linux
|
||||
- The Z file system is a pooled filesystem designed for maximum data
|
||||
- integrity, supporting data snapshots, multiple copies, and data
|
||||
- checksums.
|
||||
- .
|
||||
- This DKMS package includes the SPA, DMU, ZVOL, and ZPL components of
|
||||
- OpenZFS.
|
||||
-
|
||||
Package: zfs-initramfs
|
||||
Architecture: all
|
||||
Depends: busybox-initramfs | busybox-static | busybox,
|
||||
initramfs-tools,
|
||||
- zfs-modules | zfs-dkms,
|
||||
zfsutils-linux (>= ${binary:Version}),
|
||||
${misc:Depends}
|
||||
Description: OpenZFS root filesystem capabilities for Linux - initramfs
|
||||
@@ -116,29 +99,14 @@ Description: OpenZFS root filesystem capabilities for Linux - initramfs
|
||||
This package adds OpenZFS to the system initramfs with a hook
|
||||
for the initramfs-tools infrastructure.
|
||||
|
||||
-Package: zfs-dracut
|
||||
-Architecture: all
|
||||
-Depends: dracut,
|
||||
- zfs-modules | zfs-dkms,
|
||||
- zfsutils-linux (>= ${binary:Version}),
|
||||
- ${misc:Depends}
|
||||
-Description: OpenZFS root filesystem capabilities for Linux - dracut
|
||||
- The Z file system is a pooled filesystem designed for maximum data
|
||||
- integrity, supporting data snapshots, multiple copies, and data
|
||||
- checksums.
|
||||
- .
|
||||
- This package adds OpenZFS to the system initramfs with a hook
|
||||
- for the dracut infrastructure.
|
||||
-
|
||||
Package: zfsutils-linux
|
||||
Section: contrib/admin
|
||||
Architecture: linux-any
|
||||
Depends: python3, ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
|
||||
-Recommends: lsb-base, zfs-modules | zfs-dkms, zfs-zed
|
||||
-Breaks: zfs-dkms (<< ${binary:Version}), zfs-dkms (>> ${binary:Version})
|
||||
+Recommends: lsb-base, zfs-zed
|
||||
Suggests: nfs-kernel-server,
|
||||
samba-common-bin (>= 3.0.23),
|
||||
- zfs-initramfs | zfs-dracut
|
||||
+ zfs-initramfs
|
||||
Conflicts: zfs, zfs-fuse
|
||||
Provides: zfsutils
|
||||
Description: command-line tools to manage OpenZFS filesystems
|
||||
@@ -152,8 +120,7 @@ Description: command-line tools to manage OpenZFS filesystems
|
||||
Package: zfs-zed
|
||||
Section: contrib/admin
|
||||
Architecture: linux-any
|
||||
-Depends: zfs-modules | zfs-dkms,
|
||||
- zfsutils-linux (>= ${binary:Version}),
|
||||
+Depends: zfsutils-linux (>= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: OpenZFS Event Daemon
|
||||
@@ -176,7 +143,6 @@ Depends: acl,
|
||||
python,
|
||||
sudo,
|
||||
sysstat,
|
||||
- zfs-modules | zfs-dkms,
|
||||
zfsutils-linux (>=${binary:Version}),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
diff --git a/debian/not-installed b/debian/not-installed
|
||||
index a008985c..c60b0016 100644
|
||||
--- a/debian/not-installed
|
||||
+++ b/debian/not-installed
|
||||
@@ -6,3 +6,5 @@ etc/zfs/vdev_id.conf.alias.example
|
||||
etc/zfs/vdev_id.conf.multipath.example
|
||||
etc/zfs/vdev_id.conf.sas_direct.example
|
||||
etc/zfs/vdev_id.conf.sas_switch.example
|
||||
+usr/lib/dracut
|
||||
+usr/share/zfs/enum-extract.pl
|
||||
diff --git a/debian/rules b/debian/rules
|
||||
index e2c5a25f..86b5994d 100755
|
||||
--- a/debian/rules
|
||||
+++ b/debian/rules
|
||||
@@ -5,9 +5,6 @@ include /usr/share/dpkg/default.mk
|
||||
LSB_DISTRIBUTOR := $(shell lsb_release -is)
|
||||
NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META)
|
||||
|
||||
-DKMSFILES := module include config zfs.release.in autogen.sh META AUTHORS \
|
||||
- DISCLAIMER COPYRIGHT OPENSOLARIS.LICENSE README.markdown
|
||||
-
|
||||
ifndef BUILD_UDEB
|
||||
BUILD_UDEB=false
|
||||
endif
|
||||
@@ -17,21 +14,16 @@ KVERS=$(shell uname -r)
|
||||
endif
|
||||
|
||||
ifndef SPL
|
||||
-SPL=/usr/src/spl-$(DEB_VERSION_UPSTREAM)
|
||||
-endif
|
||||
-
|
||||
-ifndef SPLOBJ
|
||||
-SPLOBJ=/var/lib/dkms/spl/$(DEB_VERSION_UPSTREAM)/$(KVERS)/$(DEB_TARGET_GNU_CPU)
|
||||
+SPL=../spl-build
|
||||
endif
|
||||
|
||||
non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
|
||||
PACKAGE=zfs
|
||||
-pmodules = $(PACKAGE)-modules-$(non_epoch_version)
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
%:
|
||||
- dh $@ --with autoreconf,dkms,python3,systemd --parallel
|
||||
+ dh $@ --with autoreconf,python3,systemd --parallel
|
||||
|
||||
override_dh_auto_configure:
|
||||
sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control
|
||||
@@ -74,37 +66,6 @@ override_dh_auto_install:
|
||||
$(INSTALL) -d '$(CURDIR)/debian/tmp/usr/sbin/'
|
||||
mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
|
||||
|
||||
- @# Get a bare copy of the source code for DKMS.
|
||||
- @# This creates the $(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/ tree, which does not
|
||||
- @# contain the userland sources. NB: Remove-userland-dist-rules.patch
|
||||
- $(MAKE) distdir
|
||||
-
|
||||
- @# Install the DKMS source.
|
||||
- @# We only want the files needed to build the modules
|
||||
- mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts'
|
||||
- cp '$(CURDIR)/scripts/enum-extract.pl' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts'
|
||||
- $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)' || exit 1;)
|
||||
- @# Hellish awk line:
|
||||
- @# * Deletes from configure.ac the parts not needed for building the kernel module
|
||||
- @# * It deletes from inside AC_CONFIG_FILES([]) everything except:
|
||||
- @# (Makefile$|include/|module/|*.release$)
|
||||
- @# * Takes care of spaces and tabs
|
||||
- awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ { if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/|module\/|Makefile([ \t]+)?$$|zfs\.release([ \t]+)?$$))/){next} } {print}' \
|
||||
- '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac'
|
||||
- @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
|
||||
- sed '1,/CONFIG_KERNEL/s/SUBDIRS.*=.*//g;s/SUBDIRS.*=.*/SUBDIRS = module include/g;' \
|
||||
- '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am'
|
||||
- @# Sanity test
|
||||
- grep -q 'SUBDIRS = module include' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am'
|
||||
- @# Run autogen on the stripped source tree
|
||||
- cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)'; ./autogen.sh
|
||||
- rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/autom4te.cache'
|
||||
-
|
||||
- @# This shunt allows DKMS to install the Module.symvers and zfs_config.h
|
||||
- @# files to the ${dkms_tree} area through the POST_INSTALL directive.
|
||||
- printf '#!/bin/sh\ncp "$$@"\n' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/cp'
|
||||
- chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/cp'
|
||||
-
|
||||
mkdir -p $(CURDIR)/debian/tmp/usr/lib
|
||||
for i in `ls $(CURDIR)/debian/tmp/lib/*.so`; do \
|
||||
ln -s /lib/`readlink $${i}` $(CURDIR)/debian/tmp/usr/lib/`basename $${i}`; \
|
||||
@@ -114,9 +75,6 @@ override_dh_auto_install:
|
||||
chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
|
||||
chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs
|
||||
|
||||
-override_dh_dkms:
|
||||
- dh_dkms -V $(DEB_VERSION_UPSTREAM)
|
||||
-
|
||||
override_dh_makeshlibs:
|
||||
dh_makeshlibs -a -V
|
||||
ifeq ($(BUILD_UDEB), true)
|
||||
@@ -154,65 +112,5 @@ override_dh_install:
|
||||
|
||||
# ------------
|
||||
|
||||
-override_dh_prep-deb-files:
|
||||
- for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
|
||||
- sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/' \
|
||||
- < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
|
||||
- done
|
||||
- sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g' \
|
||||
- < debian/control.modules.in > debian/control
|
||||
-
|
||||
-override_dh_configure_modules_udeb: override_dh_configure_modules_udeb_stamp
|
||||
-override_dh_configure_modules_udeb_stamp:
|
||||
- ./configure \
|
||||
- --without-selinux \
|
||||
- --with-config=kernel \
|
||||
- --with-linux=$(KSRC) \
|
||||
- --with-linux-obj=$(KOBJ) \
|
||||
- --with-spl=$(SPL) \
|
||||
- --with-spl-obj=$(SPLOBJ)
|
||||
- touch override_dh_configure_modules_udeb_stamp
|
||||
-
|
||||
-override_dh_configure_modules: override_dh_configure_modules_stamp
|
||||
-override_dh_configure_modules_stamp:
|
||||
- ./configure \
|
||||
- --with-config=kernel \
|
||||
- --with-linux=$(KSRC) \
|
||||
- --with-linux-obj=$(KOBJ) \
|
||||
- --with-spl=$(SPL) \
|
||||
- --with-spl-obj=$(SPLOBJ)
|
||||
- touch override_dh_configure_modules_stamp
|
||||
-
|
||||
-override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules_udeb
|
||||
- dh_testdir
|
||||
- dh_testroot
|
||||
- dh_prep
|
||||
-
|
||||
- $(MAKE) -C $(CURDIR)/module modules
|
||||
-
|
||||
- dh_installdirs -p${pmodules}-di
|
||||
- dh_install -p${pmodules}-di
|
||||
- dh_gencontrol -p${pmodules}-di
|
||||
-
|
||||
- dh_builddeb -p${pmodules}-di
|
||||
-
|
||||
-override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
|
||||
- dh_testdir
|
||||
- dh_testroot
|
||||
- dh_prep
|
||||
-
|
||||
- $(MAKE) -C $(CURDIR)/module modules
|
||||
-
|
||||
- dh_install -p${pmodules}
|
||||
- dh_installdocs -p${pmodules}
|
||||
- dh_installchangelogs -p${pmodules}
|
||||
- dh_compress -p${pmodules}
|
||||
- dh_strip -p${pmodules}
|
||||
- dh_fixperms -p${pmodules}
|
||||
- dh_installdeb -p${pmodules}
|
||||
- dh_gencontrol -p${pmodules}
|
||||
- dh_md5sums -p${pmodules}
|
||||
- dh_builddeb -p${pmodules}
|
||||
-
|
||||
debian-copyright:
|
||||
cme update dpkg-copyright -file debian/copyright.cme
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Rohan Puri <rohan.puri15@gmail.com>
|
||||
Date: Sat, 28 Jul 2018 18:32:12 +0530
|
||||
Subject: [PATCH] Fix deadlock between zfs umount & snapentry_expire
|
||||
|
||||
zfs umount -> zfsctl_destroy() takes the zfs_snapshot_lock as a
|
||||
writer and calls zfsctl_snapshot_unmount_cancel(), which waits
|
||||
for snapentry_expire() if present (when snap is automounted).
|
||||
This snapentry_expire() itself then waits for zfs_snapshot_lock
|
||||
as a reader, resulting in a deadlock.
|
||||
|
||||
The fix is to only hold the zfs_snapshot_lock over the tree
|
||||
lookup and removal. After a successful lookup the lock can
|
||||
be dropped and zfs_snapentry_t will remain valid until the
|
||||
reference taken by the lookup is released.
|
||||
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Signed-off-by: Rohan Puri <rohan.puri15@gmail.com>
|
||||
Closes #7751
|
||||
Closes #7752
|
||||
|
||||
(Cherry-picked from fd7265c646f40e364396af5014bbb83e809e124a)
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
module/zfs/zfs_ctldir.c | 11 +++++------
|
||||
1 file changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c
|
||||
index 3b5fb196..14af55c4 100644
|
||||
--- a/module/zfs/zfs_ctldir.c
|
||||
+++ b/module/zfs/zfs_ctldir.c
|
||||
@@ -358,8 +358,6 @@ snapentry_expire(void *data)
|
||||
static void
|
||||
zfsctl_snapshot_unmount_cancel(zfs_snapentry_t *se)
|
||||
{
|
||||
- ASSERT(RW_LOCK_HELD(&zfs_snapshot_lock));
|
||||
-
|
||||
if (taskq_cancel_id(system_delay_taskq, se->se_taskqid) == 0) {
|
||||
se->se_taskqid = TASKQID_INVALID;
|
||||
zfsctl_snapshot_rele(se);
|
||||
@@ -570,13 +568,14 @@ zfsctl_destroy(zfsvfs_t *zfsvfs)
|
||||
uint64_t objsetid = dmu_objset_id(zfsvfs->z_os);
|
||||
|
||||
rw_enter(&zfs_snapshot_lock, RW_WRITER);
|
||||
- if ((se = zfsctl_snapshot_find_by_objsetid(spa, objsetid))
|
||||
- != NULL) {
|
||||
- zfsctl_snapshot_unmount_cancel(se);
|
||||
+ se = zfsctl_snapshot_find_by_objsetid(spa, objsetid);
|
||||
+ if (se != NULL)
|
||||
zfsctl_snapshot_remove(se);
|
||||
+ rw_exit(&zfs_snapshot_lock);
|
||||
+ if (se != NULL) {
|
||||
+ zfsctl_snapshot_unmount_cancel(se);
|
||||
zfsctl_snapshot_rele(se);
|
||||
}
|
||||
- rw_exit(&zfs_snapshot_lock);
|
||||
} else if (zfsvfs->z_ctldir) {
|
||||
iput(zfsvfs->z_ctldir);
|
||||
zfsvfs->z_ctldir = NULL;
|
||||
@@ -1,124 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Boris Protopopov <bprotopopov@users.noreply.github.com>
|
||||
Date: Wed, 9 Aug 2017 14:10:47 -0400
|
||||
Subject: [PATCH] zv_suspend_lock in zvol_open()/zvol_release()
|
||||
|
||||
Acquire zv_suspend_lock on first open and last close only.
|
||||
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Signed-off-by: Boris Protopopov <boris.protopopov@actifio.com>
|
||||
Closes #6342
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
module/zfs/zvol.c | 64 +++++++++++++++++++++++++++++++++++--------------------
|
||||
1 file changed, 41 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
|
||||
index 3e7059b3..ffa5fac7 100644
|
||||
--- a/module/zfs/zvol.c
|
||||
+++ b/module/zfs/zvol.c
|
||||
@@ -1347,9 +1347,9 @@ zvol_open(struct block_device *bdev, fmode_t flag)
|
||||
{
|
||||
zvol_state_t *zv;
|
||||
int error = 0;
|
||||
- boolean_t drop_suspend = B_FALSE;
|
||||
+ boolean_t drop_suspend = B_TRUE;
|
||||
|
||||
- ASSERT(!mutex_owned(&zvol_state_lock));
|
||||
+ ASSERT(!MUTEX_HELD(&zvol_state_lock));
|
||||
|
||||
mutex_enter(&zvol_state_lock);
|
||||
/*
|
||||
@@ -1364,23 +1364,31 @@ zvol_open(struct block_device *bdev, fmode_t flag)
|
||||
return (SET_ERROR(-ENXIO));
|
||||
}
|
||||
|
||||
- /* take zv_suspend_lock before zv_state_lock */
|
||||
- rw_enter(&zv->zv_suspend_lock, RW_READER);
|
||||
-
|
||||
mutex_enter(&zv->zv_state_lock);
|
||||
-
|
||||
/*
|
||||
* make sure zvol is not suspended during first open
|
||||
- * (hold zv_suspend_lock), otherwise, drop the lock
|
||||
+ * (hold zv_suspend_lock) and respect proper lock acquisition
|
||||
+ * ordering - zv_suspend_lock before zv_state_lock
|
||||
*/
|
||||
if (zv->zv_open_count == 0) {
|
||||
- drop_suspend = B_TRUE;
|
||||
+ if (!rw_tryenter(&zv->zv_suspend_lock, RW_READER)) {
|
||||
+ mutex_exit(&zv->zv_state_lock);
|
||||
+ rw_enter(&zv->zv_suspend_lock, RW_READER);
|
||||
+ mutex_enter(&zv->zv_state_lock);
|
||||
+ /* check to see if zv_suspend_lock is needed */
|
||||
+ if (zv->zv_open_count != 0) {
|
||||
+ rw_exit(&zv->zv_suspend_lock);
|
||||
+ drop_suspend = B_FALSE;
|
||||
+ }
|
||||
+ }
|
||||
} else {
|
||||
- rw_exit(&zv->zv_suspend_lock);
|
||||
+ drop_suspend = B_FALSE;
|
||||
}
|
||||
-
|
||||
mutex_exit(&zvol_state_lock);
|
||||
|
||||
+ ASSERT(MUTEX_HELD(&zv->zv_state_lock));
|
||||
+ ASSERT(zv->zv_open_count != 0 || RW_READ_HELD(&zv->zv_suspend_lock));
|
||||
+
|
||||
if (zv->zv_open_count == 0) {
|
||||
error = zvol_first_open(zv);
|
||||
if (error)
|
||||
@@ -1417,28 +1425,38 @@ static int
|
||||
zvol_release(struct gendisk *disk, fmode_t mode)
|
||||
{
|
||||
zvol_state_t *zv;
|
||||
- boolean_t drop_suspend = B_FALSE;
|
||||
+ boolean_t drop_suspend = B_TRUE;
|
||||
|
||||
- ASSERT(!mutex_owned(&zvol_state_lock));
|
||||
+ ASSERT(!MUTEX_HELD(&zvol_state_lock));
|
||||
|
||||
mutex_enter(&zvol_state_lock);
|
||||
zv = disk->private_data;
|
||||
- ASSERT(zv && zv->zv_open_count > 0);
|
||||
-
|
||||
- /* take zv_suspend_lock before zv_state_lock */
|
||||
- rw_enter(&zv->zv_suspend_lock, RW_READER);
|
||||
|
||||
mutex_enter(&zv->zv_state_lock);
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
-
|
||||
+ ASSERT(zv->zv_open_count > 0);
|
||||
/*
|
||||
* make sure zvol is not suspended during last close
|
||||
- * (hold zv_suspend_lock), otherwise, drop the lock
|
||||
+ * (hold zv_suspend_lock) and respect proper lock acquisition
|
||||
+ * ordering - zv_suspend_lock before zv_state_lock
|
||||
*/
|
||||
- if (zv->zv_open_count == 1)
|
||||
- drop_suspend = B_TRUE;
|
||||
- else
|
||||
- rw_exit(&zv->zv_suspend_lock);
|
||||
+ if (zv->zv_open_count == 1) {
|
||||
+ if (!rw_tryenter(&zv->zv_suspend_lock, RW_READER)) {
|
||||
+ mutex_exit(&zv->zv_state_lock);
|
||||
+ rw_enter(&zv->zv_suspend_lock, RW_READER);
|
||||
+ mutex_enter(&zv->zv_state_lock);
|
||||
+ /* check to see if zv_suspend_lock is needed */
|
||||
+ if (zv->zv_open_count != 1) {
|
||||
+ rw_exit(&zv->zv_suspend_lock);
|
||||
+ drop_suspend = B_FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ drop_suspend = B_FALSE;
|
||||
+ }
|
||||
+ mutex_exit(&zvol_state_lock);
|
||||
+
|
||||
+ ASSERT(MUTEX_HELD(&zv->zv_state_lock));
|
||||
+ ASSERT(zv->zv_open_count != 1 || RW_READ_HELD(&zv->zv_suspend_lock));
|
||||
|
||||
zv->zv_open_count--;
|
||||
if (zv->zv_open_count == 0)
|
||||
@@ -1,560 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Sun, 12 Aug 2018 18:22:03 -0400
|
||||
Subject: [PATCH] Linux 4.18 compat: inode timespec -> timespec64
|
||||
|
||||
Commit torvalds/linux@95582b0 changes the inode i_atime, i_mtime,
|
||||
and i_ctime members form timespec's to timespec64's to make them
|
||||
2038 safe. As part of this change the current_time() function was
|
||||
also updated to return the timespec64 type.
|
||||
|
||||
Resolve this issue by introducing a new inode_timespec_t type which
|
||||
is defined to match the timespec type used by the inode. It should
|
||||
be used when working with inode timestamps to ensure matching types.
|
||||
|
||||
The timestruc_t type under Illumos was used in a similar fashion but
|
||||
was specified to always be a timespec_t. Rather than incorrectly
|
||||
define this type all timespec_t types have been replaced by the new
|
||||
inode_timespec_t type.
|
||||
|
||||
Finally, the kernel and user space 'sys/time.h' headers were aligned
|
||||
with each other. They define as appropriate for the context several
|
||||
constants as macros and include static inline implementation of
|
||||
gethrestime(), gethrestime_sec(), and gethrtime().
|
||||
|
||||
Reviewed-by: Chunwei Chen <tuxoko@gmail.com>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #7643
|
||||
Backported-by: Richard Yao <ryao@gentoo.org>
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
config/kernel-current-time.m4 | 7 +++----
|
||||
include/sys/dmu.h | 2 +-
|
||||
include/sys/dmu_objset.h | 2 +-
|
||||
include/sys/dsl_dir.h | 4 ++--
|
||||
include/sys/spa_impl.h | 2 +-
|
||||
include/sys/xvattr.h | 2 +-
|
||||
include/sys/zfs_context.h | 9 +--------
|
||||
include/sys/zfs_znode.h | 33 +++++++++++++++++++++++--------
|
||||
include/sys/zpl.h | 9 +++++++++
|
||||
lib/libspl/Makefile.am | 2 --
|
||||
lib/libspl/gethrestime.c | 38 ------------------------------------
|
||||
lib/libspl/gethrtime.c | 45 -------------------------------------------
|
||||
lib/libspl/include/sys/time.h | 37 +++++++++++++++++++++++++++--------
|
||||
lib/libzpool/kernel.c | 4 ++--
|
||||
module/zfs/dmu_objset.c | 2 +-
|
||||
module/zfs/dsl_dir.c | 6 +++---
|
||||
module/zfs/fm.c | 2 +-
|
||||
module/zfs/zfs_ctldir.c | 2 +-
|
||||
module/zfs/zfs_vnops.c | 4 ++--
|
||||
module/zfs/zfs_znode.c | 4 ++--
|
||||
module/zfs/zpl_inode.c | 5 +++--
|
||||
21 files changed, 88 insertions(+), 133 deletions(-)
|
||||
delete mode 100644 lib/libspl/gethrestime.c
|
||||
delete mode 100644 lib/libspl/gethrtime.c
|
||||
|
||||
diff --git a/config/kernel-current-time.m4 b/config/kernel-current-time.m4
|
||||
index 2ede9ff3..c7d5c9b5 100644
|
||||
--- a/config/kernel-current-time.m4
|
||||
+++ b/config/kernel-current-time.m4
|
||||
@@ -1,15 +1,14 @@
|
||||
dnl #
|
||||
dnl # 4.9, current_time() added
|
||||
+dnl # 4.18, return type changed from timespec to timespec64
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_CURRENT_TIME],
|
||||
[AC_MSG_CHECKING([whether current_time() exists])
|
||||
ZFS_LINUX_TRY_COMPILE_SYMBOL([
|
||||
#include <linux/fs.h>
|
||||
], [
|
||||
- struct inode ip;
|
||||
- struct timespec now __attribute__ ((unused));
|
||||
-
|
||||
- now = current_time(&ip);
|
||||
+ struct inode ip __attribute__ ((unused));
|
||||
+ ip.i_atime = current_time(&ip);
|
||||
], [current_time], [fs/inode.c], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_CURRENT_TIME, 1, [current_time() exists])
|
||||
diff --git a/include/sys/dmu.h b/include/sys/dmu.h
|
||||
index bcdf7d64..755a9056 100644
|
||||
--- a/include/sys/dmu.h
|
||||
+++ b/include/sys/dmu.h
|
||||
@@ -891,7 +891,7 @@ uint64_t dmu_objset_fsid_guid(objset_t *os);
|
||||
/*
|
||||
* Get the [cm]time for an objset's snapshot dir
|
||||
*/
|
||||
-timestruc_t dmu_objset_snap_cmtime(objset_t *os);
|
||||
+inode_timespec_t dmu_objset_snap_cmtime(objset_t *os);
|
||||
|
||||
int dmu_objset_is_snapshot(objset_t *os);
|
||||
|
||||
diff --git a/include/sys/dmu_objset.h b/include/sys/dmu_objset.h
|
||||
index a836e037..531e81d4 100644
|
||||
--- a/include/sys/dmu_objset.h
|
||||
+++ b/include/sys/dmu_objset.h
|
||||
@@ -179,7 +179,7 @@ int dmu_objset_find_dp(struct dsl_pool *dp, uint64_t ddobj,
|
||||
int func(struct dsl_pool *, struct dsl_dataset *, void *),
|
||||
void *arg, int flags);
|
||||
void dmu_objset_evict_dbufs(objset_t *os);
|
||||
-timestruc_t dmu_objset_snap_cmtime(objset_t *os);
|
||||
+inode_timespec_t dmu_objset_snap_cmtime(objset_t *os);
|
||||
|
||||
/* called from dsl */
|
||||
void dmu_objset_sync(objset_t *os, zio_t *zio, dmu_tx_t *tx);
|
||||
diff --git a/include/sys/dsl_dir.h b/include/sys/dsl_dir.h
|
||||
index 69b0b6a5..80e83fdc 100644
|
||||
--- a/include/sys/dsl_dir.h
|
||||
+++ b/include/sys/dsl_dir.h
|
||||
@@ -103,7 +103,7 @@ struct dsl_dir {
|
||||
/* Protected by dd_lock */
|
||||
kmutex_t dd_lock;
|
||||
list_t dd_props; /* list of dsl_prop_record_t's */
|
||||
- timestruc_t dd_snap_cmtime; /* last time snapshot namespace changed */
|
||||
+ inode_timespec_t dd_snap_cmtime; /* last snapshot namespace change */
|
||||
uint64_t dd_origin_txg;
|
||||
|
||||
/* gross estimate of space used by in-flight tx's */
|
||||
@@ -159,7 +159,7 @@ boolean_t dsl_dir_is_clone(dsl_dir_t *dd);
|
||||
void dsl_dir_new_refreservation(dsl_dir_t *dd, struct dsl_dataset *ds,
|
||||
uint64_t reservation, cred_t *cr, dmu_tx_t *tx);
|
||||
void dsl_dir_snap_cmtime_update(dsl_dir_t *dd);
|
||||
-timestruc_t dsl_dir_snap_cmtime(dsl_dir_t *dd);
|
||||
+inode_timespec_t dsl_dir_snap_cmtime(dsl_dir_t *dd);
|
||||
void dsl_dir_set_reservation_sync_impl(dsl_dir_t *dd, uint64_t value,
|
||||
dmu_tx_t *tx);
|
||||
void dsl_dir_zapify(dsl_dir_t *dd, dmu_tx_t *tx);
|
||||
diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h
|
||||
index b1e78c1d..fa7490ac 100644
|
||||
--- a/include/sys/spa_impl.h
|
||||
+++ b/include/sys/spa_impl.h
|
||||
@@ -153,7 +153,7 @@ struct spa {
|
||||
uint64_t spa_freeze_txg; /* freeze pool at this txg */
|
||||
uint64_t spa_load_max_txg; /* best initial ub_txg */
|
||||
uint64_t spa_claim_max_txg; /* highest claimed birth txg */
|
||||
- timespec_t spa_loaded_ts; /* 1st successful open time */
|
||||
+ inode_timespec_t spa_loaded_ts; /* 1st successful open time */
|
||||
objset_t *spa_meta_objset; /* copy of dp->dp_meta_objset */
|
||||
kmutex_t spa_evicting_os_lock; /* Evicting objset list lock */
|
||||
list_t spa_evicting_os_list; /* Objsets being evicted. */
|
||||
diff --git a/include/sys/xvattr.h b/include/sys/xvattr.h
|
||||
index 4779b632..5d38927c 100644
|
||||
--- a/include/sys/xvattr.h
|
||||
+++ b/include/sys/xvattr.h
|
||||
@@ -47,7 +47,7 @@
|
||||
* Structure of all optional attributes.
|
||||
*/
|
||||
typedef struct xoptattr {
|
||||
- timestruc_t xoa_createtime; /* Create time of file */
|
||||
+ inode_timespec_t xoa_createtime; /* Create time of file */
|
||||
uint8_t xoa_archive;
|
||||
uint8_t xoa_system;
|
||||
uint8_t xoa_readonly;
|
||||
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
|
||||
index 4fe35342..68c58f95 100644
|
||||
--- a/include/sys/zfs_context.h
|
||||
+++ b/include/sys/zfs_context.h
|
||||
@@ -527,7 +527,7 @@ extern char *vn_dumpdir;
|
||||
#define AV_SCANSTAMP_SZ 32 /* length of anti-virus scanstamp */
|
||||
|
||||
typedef struct xoptattr {
|
||||
- timestruc_t xoa_createtime; /* Create time of file */
|
||||
+ inode_timespec_t xoa_createtime; /* Create time of file */
|
||||
uint8_t xoa_archive;
|
||||
uint8_t xoa_system;
|
||||
uint8_t xoa_readonly;
|
||||
@@ -640,13 +640,6 @@ extern void delay(clock_t ticks);
|
||||
#define USEC_TO_TICK(usec) ((usec) / (MICROSEC / hz))
|
||||
#define NSEC_TO_TICK(usec) ((usec) / (NANOSEC / hz))
|
||||
|
||||
-#define gethrestime_sec() time(NULL)
|
||||
-#define gethrestime(t) \
|
||||
- do {\
|
||||
- (t)->tv_sec = gethrestime_sec();\
|
||||
- (t)->tv_nsec = 0;\
|
||||
- } while (0);
|
||||
-
|
||||
#define max_ncpus 64
|
||||
#define boot_ncpus (sysconf(_SC_NPROCESSORS_ONLN))
|
||||
|
||||
diff --git a/include/sys/zfs_znode.h b/include/sys/zfs_znode.h
|
||||
index c292f037..26d1eb37 100644
|
||||
--- a/include/sys/zfs_znode.h
|
||||
+++ b/include/sys/zfs_znode.h
|
||||
@@ -270,19 +270,36 @@ typedef struct znode_hold {
|
||||
|
||||
extern unsigned int zfs_object_mutex_size;
|
||||
|
||||
-/* Encode ZFS stored time values from a struct timespec */
|
||||
+/*
|
||||
+ * Encode ZFS stored time values from a struct timespec / struct timespec64.
|
||||
+ */
|
||||
#define ZFS_TIME_ENCODE(tp, stmp) \
|
||||
-{ \
|
||||
+do { \
|
||||
(stmp)[0] = (uint64_t)(tp)->tv_sec; \
|
||||
(stmp)[1] = (uint64_t)(tp)->tv_nsec; \
|
||||
-}
|
||||
+} while (0)
|
||||
|
||||
-/* Decode ZFS stored time values to a struct timespec */
|
||||
+#if defined(HAVE_INODE_TIMESPEC64_TIMES)
|
||||
+/*
|
||||
+ * Decode ZFS stored time values to a struct timespec64
|
||||
+ * 4.18 and newer kernels.
|
||||
+ */
|
||||
#define ZFS_TIME_DECODE(tp, stmp) \
|
||||
-{ \
|
||||
- (tp)->tv_sec = (time_t)(stmp)[0]; \
|
||||
- (tp)->tv_nsec = (long)(stmp)[1]; \
|
||||
-}
|
||||
+do { \
|
||||
+ (tp)->tv_sec = (time64_t)(stmp)[0]; \
|
||||
+ (tp)->tv_nsec = (long)(stmp)[1]; \
|
||||
+} while (0)
|
||||
+#else
|
||||
+/*
|
||||
+ * Decode ZFS stored time values to a struct timespec
|
||||
+ * 4.17 and older kernels.
|
||||
+ */
|
||||
+#define ZFS_TIME_DECODE(tp, stmp) \
|
||||
+do { \
|
||||
+ (tp)->tv_sec = (time_t)(stmp)[0]; \
|
||||
+ (tp)->tv_nsec = (long)(stmp)[1]; \
|
||||
+} while (0)
|
||||
+#endif /* HAVE_INODE_TIMESPEC64_TIMES */
|
||||
|
||||
/*
|
||||
* Timestamp defines
|
||||
diff --git a/include/sys/zpl.h b/include/sys/zpl.h
|
||||
index 65ed4313..e433fbc6 100644
|
||||
--- a/include/sys/zpl.h
|
||||
+++ b/include/sys/zpl.h
|
||||
@@ -189,4 +189,13 @@ zpl_dir_emit_dots(struct file *file, zpl_dir_context_t *ctx)
|
||||
}
|
||||
#endif /* HAVE_VFS_ITERATE */
|
||||
|
||||
+/*
|
||||
+ * Linux 4.18, inode times converted from timespec to timespec64.
|
||||
+ */
|
||||
+#if defined(HAVE_INODE_TIMESPEC64_TIMES)
|
||||
+#define zpl_inode_timespec_trunc(ts, gran) timespec64_trunc(ts, gran)
|
||||
+#else
|
||||
+#define zpl_inode_timespec_trunc(ts, gran) timespec_trunc(ts, gran)
|
||||
+#endif
|
||||
+
|
||||
#endif /* _SYS_ZPL_H */
|
||||
diff --git a/lib/libspl/Makefile.am b/lib/libspl/Makefile.am
|
||||
index 59bc8ffb..a6e63cb8 100644
|
||||
--- a/lib/libspl/Makefile.am
|
||||
+++ b/lib/libspl/Makefile.am
|
||||
@@ -19,8 +19,6 @@ noinst_LTLIBRARIES = libspl.la
|
||||
|
||||
USER_C = \
|
||||
getexecname.c \
|
||||
- gethrtime.c \
|
||||
- gethrestime.c \
|
||||
getmntany.c \
|
||||
list.c \
|
||||
mkdirp.c \
|
||||
diff --git a/lib/libspl/gethrestime.c b/lib/libspl/gethrestime.c
|
||||
deleted file mode 100644
|
||||
index d37cc2d5..00000000
|
||||
--- a/lib/libspl/gethrestime.c
|
||||
+++ /dev/null
|
||||
@@ -1,38 +0,0 @@
|
||||
-/*
|
||||
- * CDDL HEADER START
|
||||
- *
|
||||
- * The contents of this file are subject to the terms of the
|
||||
- * Common Development and Distribution License (the "License").
|
||||
- * You may not use this file except in compliance with the License.
|
||||
- *
|
||||
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
- * or http://www.opensolaris.org/os/licensing.
|
||||
- * See the License for the specific language governing permissions
|
||||
- * and limitations under the License.
|
||||
- *
|
||||
- * When distributing Covered Code, include this CDDL HEADER in each
|
||||
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
- * If applicable, add the following below this CDDL HEADER, with the
|
||||
- * fields enclosed by brackets "[]" replaced with your own identifying
|
||||
- * information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
- *
|
||||
- * CDDL HEADER END
|
||||
- */
|
||||
-
|
||||
-/*
|
||||
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
- * Use is subject to license terms.
|
||||
- */
|
||||
-
|
||||
-#include <time.h>
|
||||
-#include <sys/time.h>
|
||||
-
|
||||
-void
|
||||
-gethrestime(timestruc_t *ts)
|
||||
-{
|
||||
- struct timeval tv;
|
||||
-
|
||||
- gettimeofday(&tv, NULL);
|
||||
- ts->tv_sec = tv.tv_sec;
|
||||
- ts->tv_nsec = tv.tv_usec * NSEC_PER_USEC;
|
||||
-}
|
||||
diff --git a/lib/libspl/gethrtime.c b/lib/libspl/gethrtime.c
|
||||
deleted file mode 100644
|
||||
index 95ceb18e..00000000
|
||||
--- a/lib/libspl/gethrtime.c
|
||||
+++ /dev/null
|
||||
@@ -1,45 +0,0 @@
|
||||
-/*
|
||||
- * CDDL HEADER START
|
||||
- *
|
||||
- * The contents of this file are subject to the terms of the
|
||||
- * Common Development and Distribution License (the "License").
|
||||
- * You may not use this file except in compliance with the License.
|
||||
- *
|
||||
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
- * or http://www.opensolaris.org/os/licensing.
|
||||
- * See the License for the specific language governing permissions
|
||||
- * and limitations under the License.
|
||||
- *
|
||||
- * When distributing Covered Code, include this CDDL HEADER in each
|
||||
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
- * If applicable, add the following below this CDDL HEADER, with the
|
||||
- * fields enclosed by brackets "[]" replaced with your own identifying
|
||||
- * information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
- *
|
||||
- * CDDL HEADER END
|
||||
- */
|
||||
-
|
||||
-/*
|
||||
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
- * Use is subject to license terms.
|
||||
- */
|
||||
-
|
||||
-#include <time.h>
|
||||
-#include <sys/time.h>
|
||||
-#include <stdlib.h>
|
||||
-#include <stdio.h>
|
||||
-
|
||||
-hrtime_t
|
||||
-gethrtime(void)
|
||||
-{
|
||||
- struct timespec ts;
|
||||
- int rc;
|
||||
-
|
||||
- rc = clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
- if (rc) {
|
||||
- fprintf(stderr, "Error: clock_gettime() = %d\n", rc);
|
||||
- abort();
|
||||
- }
|
||||
-
|
||||
- return ((((u_int64_t)ts.tv_sec) * NANOSEC) + ts.tv_nsec);
|
||||
-}
|
||||
diff --git a/lib/libspl/include/sys/time.h b/lib/libspl/include/sys/time.h
|
||||
index dc645fa5..04b3ba87 100644
|
||||
--- a/lib/libspl/include/sys/time.h
|
||||
+++ b/lib/libspl/include/sys/time.h
|
||||
@@ -27,8 +27,9 @@
|
||||
#ifndef _LIBSPL_SYS_TIME_H
|
||||
#define _LIBSPL_SYS_TIME_H
|
||||
|
||||
-#include_next <sys/time.h>
|
||||
+#include <time.h>
|
||||
#include <sys/types.h>
|
||||
+#include_next <sys/time.h>
|
||||
|
||||
#ifndef SEC
|
||||
#define SEC 1
|
||||
@@ -70,13 +71,33 @@
|
||||
#define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC))
|
||||
#endif
|
||||
|
||||
-
|
||||
typedef long long hrtime_t;
|
||||
-typedef struct timespec timestruc_t;
|
||||
-typedef struct timespec timespec_t;
|
||||
-
|
||||
-
|
||||
-extern hrtime_t gethrtime(void);
|
||||
-extern void gethrestime(timestruc_t *);
|
||||
+typedef struct timespec timespec_t;
|
||||
+typedef struct timespec inode_timespec_t;
|
||||
+
|
||||
+static inline void
|
||||
+gethrestime(inode_timespec_t *ts)
|
||||
+{
|
||||
+ struct timeval tv;
|
||||
+ (void) gettimeofday(&tv, NULL);
|
||||
+ ts->tv_sec = tv.tv_sec;
|
||||
+ ts->tv_nsec = tv.tv_usec * NSEC_PER_USEC;
|
||||
+}
|
||||
+
|
||||
+static inline time_t
|
||||
+gethrestime_sec(void)
|
||||
+{
|
||||
+ struct timeval tv;
|
||||
+ (void) gettimeofday(&tv, NULL);
|
||||
+ return (tv.tv_sec);
|
||||
+}
|
||||
+
|
||||
+static inline hrtime_t
|
||||
+gethrtime(void)
|
||||
+{
|
||||
+ struct timespec ts;
|
||||
+ (void) clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
+ return ((((u_int64_t)ts.tv_sec) * NANOSEC) + ts.tv_nsec);
|
||||
+}
|
||||
|
||||
#endif /* _LIBSPL_SYS_TIME_H */
|
||||
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c
|
||||
index e67d13c9..3ea8778b 100644
|
||||
--- a/lib/libzpool/kernel.c
|
||||
+++ b/lib/libzpool/kernel.c
|
||||
@@ -498,7 +498,7 @@ cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime)
|
||||
{
|
||||
int error;
|
||||
struct timeval tv;
|
||||
- timestruc_t ts;
|
||||
+ struct timespec ts;
|
||||
clock_t delta;
|
||||
|
||||
ASSERT3U(cv->cv_magic, ==, CV_MAGIC);
|
||||
@@ -536,7 +536,7 @@ cv_timedwait_hires(kcondvar_t *cv, kmutex_t *mp, hrtime_t tim, hrtime_t res,
|
||||
{
|
||||
int error;
|
||||
struct timeval tv;
|
||||
- timestruc_t ts;
|
||||
+ struct timespec ts;
|
||||
hrtime_t delta;
|
||||
|
||||
ASSERT(flag == 0 || flag == CALLOUT_FLAG_ABSOLUTE);
|
||||
diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c
|
||||
index 3425d542..449ebedf 100644
|
||||
--- a/module/zfs/dmu_objset.c
|
||||
+++ b/module/zfs/dmu_objset.c
|
||||
@@ -860,7 +860,7 @@ dmu_objset_evict_done(objset_t *os)
|
||||
kmem_free(os, sizeof (objset_t));
|
||||
}
|
||||
|
||||
-timestruc_t
|
||||
+inode_timespec_t
|
||||
dmu_objset_snap_cmtime(objset_t *os)
|
||||
{
|
||||
return (dsl_dir_snap_cmtime(os->os_dsl_dataset->ds_dir));
|
||||
diff --git a/module/zfs/dsl_dir.c b/module/zfs/dsl_dir.c
|
||||
index a3ef5896..deecf6bc 100644
|
||||
--- a/module/zfs/dsl_dir.c
|
||||
+++ b/module/zfs/dsl_dir.c
|
||||
@@ -1975,10 +1975,10 @@ dsl_dir_transfer_possible(dsl_dir_t *sdd, dsl_dir_t *tdd,
|
||||
return (0);
|
||||
}
|
||||
|
||||
-timestruc_t
|
||||
+inode_timespec_t
|
||||
dsl_dir_snap_cmtime(dsl_dir_t *dd)
|
||||
{
|
||||
- timestruc_t t;
|
||||
+ inode_timespec_t t;
|
||||
|
||||
mutex_enter(&dd->dd_lock);
|
||||
t = dd->dd_snap_cmtime;
|
||||
@@ -1990,7 +1990,7 @@ dsl_dir_snap_cmtime(dsl_dir_t *dd)
|
||||
void
|
||||
dsl_dir_snap_cmtime_update(dsl_dir_t *dd)
|
||||
{
|
||||
- timestruc_t t;
|
||||
+ inode_timespec_t t;
|
||||
|
||||
gethrestime(&t);
|
||||
mutex_enter(&dd->dd_lock);
|
||||
diff --git a/module/zfs/fm.c b/module/zfs/fm.c
|
||||
index cb148149..9d26cc99 100644
|
||||
--- a/module/zfs/fm.c
|
||||
+++ b/module/zfs/fm.c
|
||||
@@ -508,8 +508,8 @@ zfs_zevent_insert(zevent_t *ev)
|
||||
int
|
||||
zfs_zevent_post(nvlist_t *nvl, nvlist_t *detector, zevent_cb_t *cb)
|
||||
{
|
||||
+ inode_timespec_t tv;
|
||||
int64_t tv_array[2];
|
||||
- timestruc_t tv;
|
||||
uint64_t eid;
|
||||
size_t nvl_size = 0;
|
||||
zevent_t *ev;
|
||||
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c
|
||||
index 14af55c4..25edea78 100644
|
||||
--- a/module/zfs/zfs_ctldir.c
|
||||
+++ b/module/zfs/zfs_ctldir.c
|
||||
@@ -449,7 +449,7 @@ static struct inode *
|
||||
zfsctl_inode_alloc(zfsvfs_t *zfsvfs, uint64_t id,
|
||||
const struct file_operations *fops, const struct inode_operations *ops)
|
||||
{
|
||||
- struct timespec now;
|
||||
+ inode_timespec_t now;
|
||||
struct inode *ip;
|
||||
znode_t *zp;
|
||||
|
||||
diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
|
||||
index 0d2b61a1..34ea751c 100644
|
||||
--- a/module/zfs/zfs_vnops.c
|
||||
+++ b/module/zfs/zfs_vnops.c
|
||||
@@ -3158,7 +3158,7 @@ top:
|
||||
|
||||
if (mask & (ATTR_MTIME | ATTR_SIZE)) {
|
||||
ZFS_TIME_ENCODE(&vap->va_mtime, mtime);
|
||||
- ZTOI(zp)->i_mtime = timespec_trunc(vap->va_mtime,
|
||||
+ ZTOI(zp)->i_mtime = zpl_inode_timespec_trunc(vap->va_mtime,
|
||||
ZTOI(zp)->i_sb->s_time_gran);
|
||||
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MTIME(zfsvfs), NULL,
|
||||
@@ -3167,7 +3167,7 @@ top:
|
||||
|
||||
if (mask & (ATTR_CTIME | ATTR_SIZE)) {
|
||||
ZFS_TIME_ENCODE(&vap->va_ctime, ctime);
|
||||
- ZTOI(zp)->i_ctime = timespec_trunc(vap->va_ctime,
|
||||
+ ZTOI(zp)->i_ctime = zpl_inode_timespec_trunc(vap->va_ctime,
|
||||
ZTOI(zp)->i_sb->s_time_gran);
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL,
|
||||
ctime, sizeof (ctime));
|
||||
diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c
|
||||
index f508a248..e222c791 100644
|
||||
--- a/module/zfs/zfs_znode.c
|
||||
+++ b/module/zfs/zfs_znode.c
|
||||
@@ -700,7 +700,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, dmu_tx_t *tx, cred_t *cr,
|
||||
uint64_t rdev = 0;
|
||||
zfsvfs_t *zfsvfs = ZTOZSB(dzp);
|
||||
dmu_buf_t *db;
|
||||
- timestruc_t now;
|
||||
+ inode_timespec_t now;
|
||||
uint64_t gen, obj;
|
||||
int bonuslen;
|
||||
int dnodesize;
|
||||
@@ -1349,7 +1349,7 @@ void
|
||||
zfs_tstamp_update_setup(znode_t *zp, uint_t flag, uint64_t mtime[2],
|
||||
uint64_t ctime[2])
|
||||
{
|
||||
- timestruc_t now;
|
||||
+ inode_timespec_t now;
|
||||
|
||||
gethrestime(&now);
|
||||
|
||||
diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c
|
||||
index 3b5643d0..41b91cab 100644
|
||||
--- a/module/zfs/zpl_inode.c
|
||||
+++ b/module/zfs/zpl_inode.c
|
||||
@@ -384,9 +384,10 @@ zpl_setattr(struct dentry *dentry, struct iattr *ia)
|
||||
vap->va_mtime = ia->ia_mtime;
|
||||
vap->va_ctime = ia->ia_ctime;
|
||||
|
||||
- if (vap->va_mask & ATTR_ATIME)
|
||||
- ip->i_atime = timespec_trunc(ia->ia_atime,
|
||||
+ if (vap->va_mask & ATTR_ATIME) {
|
||||
+ ip->i_atime = zpl_inode_timespec_trunc(ia->ia_atime,
|
||||
ip->i_sb->s_time_gran);
|
||||
+ }
|
||||
|
||||
cookie = spl_fstrans_mark();
|
||||
error = -zfs_setattr(ip, vap, 0, cr);
|
||||
@@ -1,808 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Fri, 15 Jun 2018 15:05:21 -0700
|
||||
Subject: [PATCH] Linux compat 4.18: check_disk_size_change()
|
||||
|
||||
Added support for the bops->check_events() interface which was
|
||||
added in the 2.6.38 kernel to replace bops->media_changed().
|
||||
Fully implementing this functionality allows the volume resize
|
||||
code to rely on revalidate_disk(), which is the preferred
|
||||
mechanism, and removes the need to use check_disk_size_change().
|
||||
|
||||
In order for bops->check_events() to lookup the zvol_state_t
|
||||
stored in the disk->private_data the zvol_state_lock needs to
|
||||
be held. Since the check events interface may poll the mutex
|
||||
has been converted to a rwlock for better concurrently. The
|
||||
rwlock need only be taken as a writer in the zvol_free() path
|
||||
when disk->private_data is set to NULL.
|
||||
|
||||
The configure checks for the block_device_operations structure
|
||||
were consolidated in a single kernel-block-device-operations.m4
|
||||
file.
|
||||
|
||||
The ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS configure checks
|
||||
and assoicated dead code was removed. This interface was added
|
||||
to the 2.6.28 kernel which predates the oldest supported 2.6.32
|
||||
kernel and will therefore always be available.
|
||||
|
||||
Updated maximum Linux version in META file. The 4.17 kernel
|
||||
was released on 2018-06-03 and ZoL is compatible with the
|
||||
finalized kernel.
|
||||
|
||||
Reviewed-by: Boris Protopopov <boris.protopopov@actifio.com>
|
||||
Reviewed-by: Sara Hartse <sara.hartse@delphix.com>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #7611
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
config/kernel-bdev-block-device-operations.m4 | 34 ---
|
||||
.../kernel-block-device-operations-release-void.m4 | 29 ---
|
||||
config/kernel-block-device-operations.m4 | 57 +++++
|
||||
config/kernel.m4 | 2 +-
|
||||
include/linux/blkdev_compat.h | 1 +
|
||||
module/zfs/zvol.c | 259 +++++++++------------
|
||||
6 files changed, 174 insertions(+), 208 deletions(-)
|
||||
delete mode 100644 config/kernel-bdev-block-device-operations.m4
|
||||
delete mode 100644 config/kernel-block-device-operations-release-void.m4
|
||||
create mode 100644 config/kernel-block-device-operations.m4
|
||||
|
||||
diff --git a/config/kernel-bdev-block-device-operations.m4 b/config/kernel-bdev-block-device-operations.m4
|
||||
deleted file mode 100644
|
||||
index faacc195..00000000
|
||||
--- a/config/kernel-bdev-block-device-operations.m4
|
||||
+++ /dev/null
|
||||
@@ -1,34 +0,0 @@
|
||||
-dnl #
|
||||
-dnl # 2.6.x API change
|
||||
-dnl #
|
||||
-AC_DEFUN([ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS], [
|
||||
- AC_MSG_CHECKING([block device operation prototypes])
|
||||
- tmp_flags="$EXTRA_KCFLAGS"
|
||||
- EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
|
||||
- ZFS_LINUX_TRY_COMPILE([
|
||||
- #include <linux/blkdev.h>
|
||||
-
|
||||
- int blk_open(struct block_device *bdev, fmode_t mode)
|
||||
- { return 0; }
|
||||
- int blk_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
- unsigned x, unsigned long y) { return 0; }
|
||||
- int blk_compat_ioctl(struct block_device * bdev, fmode_t mode,
|
||||
- unsigned x, unsigned long y) { return 0; }
|
||||
-
|
||||
- static const struct block_device_operations
|
||||
- bops __attribute__ ((unused)) = {
|
||||
- .open = blk_open,
|
||||
- .release = NULL,
|
||||
- .ioctl = blk_ioctl,
|
||||
- .compat_ioctl = blk_compat_ioctl,
|
||||
- };
|
||||
- ],[
|
||||
- ],[
|
||||
- AC_MSG_RESULT(struct block_device)
|
||||
- AC_DEFINE(HAVE_BDEV_BLOCK_DEVICE_OPERATIONS, 1,
|
||||
- [struct block_device_operations use bdevs])
|
||||
- ],[
|
||||
- AC_MSG_RESULT(struct inode)
|
||||
- ])
|
||||
- EXTRA_KCFLAGS="$tmp_flags"
|
||||
-])
|
||||
diff --git a/config/kernel-block-device-operations-release-void.m4 b/config/kernel-block-device-operations-release-void.m4
|
||||
deleted file mode 100644
|
||||
index a73f8587..00000000
|
||||
--- a/config/kernel-block-device-operations-release-void.m4
|
||||
+++ /dev/null
|
||||
@@ -1,29 +0,0 @@
|
||||
-dnl #
|
||||
-dnl # 3.10.x API change
|
||||
-dnl #
|
||||
-AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
|
||||
- AC_MSG_CHECKING([whether block_device_operations.release is void])
|
||||
- tmp_flags="$EXTRA_KCFLAGS"
|
||||
- EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
|
||||
- ZFS_LINUX_TRY_COMPILE([
|
||||
- #include <linux/blkdev.h>
|
||||
-
|
||||
- void blk_release(struct gendisk *g, fmode_t mode) { return; }
|
||||
-
|
||||
- static const struct block_device_operations
|
||||
- bops __attribute__ ((unused)) = {
|
||||
- .open = NULL,
|
||||
- .release = blk_release,
|
||||
- .ioctl = NULL,
|
||||
- .compat_ioctl = NULL,
|
||||
- };
|
||||
- ],[
|
||||
- ],[
|
||||
- AC_MSG_RESULT(void)
|
||||
- AC_DEFINE(HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID, 1,
|
||||
- [struct block_device_operations.release returns void])
|
||||
- ],[
|
||||
- AC_MSG_RESULT(int)
|
||||
- ])
|
||||
- EXTRA_KCFLAGS="$tmp_flags"
|
||||
-])
|
||||
diff --git a/config/kernel-block-device-operations.m4 b/config/kernel-block-device-operations.m4
|
||||
new file mode 100644
|
||||
index 00000000..5f2811c1
|
||||
--- /dev/null
|
||||
+++ b/config/kernel-block-device-operations.m4
|
||||
@@ -0,0 +1,57 @@
|
||||
+dnl #
|
||||
+dnl # 2.6.38 API change
|
||||
+dnl #
|
||||
+AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS], [
|
||||
+ AC_MSG_CHECKING([whether bops->check_events() exists])
|
||||
+ tmp_flags="$EXTRA_KCFLAGS"
|
||||
+ EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
|
||||
+ ZFS_LINUX_TRY_COMPILE([
|
||||
+ #include <linux/blkdev.h>
|
||||
+
|
||||
+ unsigned int blk_check_events(struct gendisk *disk,
|
||||
+ unsigned int clearing) { return (0); }
|
||||
+
|
||||
+ static const struct block_device_operations
|
||||
+ bops __attribute__ ((unused)) = {
|
||||
+ .check_events = blk_check_events,
|
||||
+ };
|
||||
+ ],[
|
||||
+ ],[
|
||||
+ AC_MSG_RESULT(yes)
|
||||
+ AC_DEFINE(HAVE_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS, 1,
|
||||
+ [bops->check_events() exists])
|
||||
+ ],[
|
||||
+ AC_MSG_RESULT(no)
|
||||
+ ])
|
||||
+ EXTRA_KCFLAGS="$tmp_flags"
|
||||
+])
|
||||
+
|
||||
+dnl #
|
||||
+dnl # 3.10.x API change
|
||||
+dnl #
|
||||
+AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
|
||||
+ AC_MSG_CHECKING([whether bops->release() is void])
|
||||
+ tmp_flags="$EXTRA_KCFLAGS"
|
||||
+ EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
|
||||
+ ZFS_LINUX_TRY_COMPILE([
|
||||
+ #include <linux/blkdev.h>
|
||||
+
|
||||
+ void blk_release(struct gendisk *g, fmode_t mode) { return; }
|
||||
+
|
||||
+ static const struct block_device_operations
|
||||
+ bops __attribute__ ((unused)) = {
|
||||
+ .open = NULL,
|
||||
+ .release = blk_release,
|
||||
+ .ioctl = NULL,
|
||||
+ .compat_ioctl = NULL,
|
||||
+ };
|
||||
+ ],[
|
||||
+ ],[
|
||||
+ AC_MSG_RESULT(void)
|
||||
+ AC_DEFINE(HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID, 1,
|
||||
+ [bops->release() returns void])
|
||||
+ ],[
|
||||
+ AC_MSG_RESULT(int)
|
||||
+ ])
|
||||
+ EXTRA_KCFLAGS="$tmp_flags"
|
||||
+])
|
||||
diff --git a/config/kernel.m4 b/config/kernel.m4
|
||||
index 375e4b79..c7ca260c 100644
|
||||
--- a/config/kernel.m4
|
||||
+++ b/config/kernel.m4
|
||||
@@ -12,7 +12,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
|
||||
ZFS_AC_KERNEL_CURRENT_BIO_TAIL
|
||||
ZFS_AC_KERNEL_SUPER_USER_NS
|
||||
ZFS_AC_KERNEL_SUBMIT_BIO
|
||||
- ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS
|
||||
+ ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS
|
||||
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
|
||||
ZFS_AC_KERNEL_TYPE_FMODE_T
|
||||
ZFS_AC_KERNEL_3ARG_BLKDEV_GET
|
||||
diff --git a/include/linux/blkdev_compat.h b/include/linux/blkdev_compat.h
|
||||
index f99980ab..27f05662 100644
|
||||
--- a/include/linux/blkdev_compat.h
|
||||
+++ b/include/linux/blkdev_compat.h
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/elevator.h>
|
||||
#include <linux/backing-dev.h>
|
||||
+#include <linux/msdos_fs.h> /* for SECTOR_* */
|
||||
|
||||
#ifndef HAVE_FMODE_T
|
||||
typedef unsigned __bitwise__ fmode_t;
|
||||
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
|
||||
index ffa5fac7..03f95630 100644
|
||||
--- a/module/zfs/zvol.c
|
||||
+++ b/module/zfs/zvol.c
|
||||
@@ -99,7 +99,7 @@ unsigned long zvol_max_discard_blocks = 16384;
|
||||
unsigned int zvol_volmode = ZFS_VOLMODE_GEOM;
|
||||
|
||||
static taskq_t *zvol_taskq;
|
||||
-static kmutex_t zvol_state_lock;
|
||||
+static krwlock_t zvol_state_lock;
|
||||
static list_t zvol_state_list;
|
||||
|
||||
#define ZVOL_HT_SIZE 1024
|
||||
@@ -176,17 +176,17 @@ zvol_find_by_dev(dev_t dev)
|
||||
{
|
||||
zvol_state_t *zv;
|
||||
|
||||
- mutex_enter(&zvol_state_lock);
|
||||
+ rw_enter(&zvol_state_lock, RW_READER);
|
||||
for (zv = list_head(&zvol_state_list); zv != NULL;
|
||||
zv = list_next(&zvol_state_list, zv)) {
|
||||
mutex_enter(&zv->zv_state_lock);
|
||||
if (zv->zv_dev == dev) {
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
return (zv);
|
||||
}
|
||||
mutex_exit(&zv->zv_state_lock);
|
||||
}
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
@@ -204,7 +204,7 @@ zvol_find_by_name_hash(const char *name, uint64_t hash, int mode)
|
||||
zvol_state_t *zv;
|
||||
struct hlist_node *p = NULL;
|
||||
|
||||
- mutex_enter(&zvol_state_lock);
|
||||
+ rw_enter(&zvol_state_lock, RW_READER);
|
||||
hlist_for_each(p, ZVOL_HT_HEAD(hash)) {
|
||||
zv = hlist_entry(p, zvol_state_t, zv_hlink);
|
||||
mutex_enter(&zv->zv_state_lock);
|
||||
@@ -227,12 +227,12 @@ zvol_find_by_name_hash(const char *name, uint64_t hash, int mode)
|
||||
strncmp(zv->zv_name, name, MAXNAMELEN)
|
||||
== 0);
|
||||
}
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
return (zv);
|
||||
}
|
||||
mutex_exit(&zv->zv_state_lock);
|
||||
}
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
@@ -339,24 +339,6 @@ zvol_get_stats(objset_t *os, nvlist_t *nv)
|
||||
return (SET_ERROR(error));
|
||||
}
|
||||
|
||||
-static void
|
||||
-zvol_size_changed(zvol_state_t *zv, uint64_t volsize)
|
||||
-{
|
||||
- struct block_device *bdev;
|
||||
-
|
||||
- ASSERT(MUTEX_HELD(&zv->zv_state_lock));
|
||||
-
|
||||
- bdev = bdget_disk(zv->zv_disk, 0);
|
||||
- if (bdev == NULL)
|
||||
- return;
|
||||
-
|
||||
- set_capacity(zv->zv_disk, volsize >> 9);
|
||||
- zv->zv_volsize = volsize;
|
||||
- check_disk_size_change(zv->zv_disk, bdev);
|
||||
-
|
||||
- bdput(bdev);
|
||||
-}
|
||||
-
|
||||
/*
|
||||
* Sanity check volume size.
|
||||
*/
|
||||
@@ -409,31 +391,17 @@ zvol_update_volsize(uint64_t volsize, objset_t *os)
|
||||
return (error);
|
||||
}
|
||||
|
||||
-static int
|
||||
-zvol_update_live_volsize(zvol_state_t *zv, uint64_t volsize)
|
||||
-{
|
||||
- zvol_size_changed(zv, volsize);
|
||||
-
|
||||
- /*
|
||||
- * We should post a event here describing the expansion. However,
|
||||
- * the zfs_ereport_post() interface doesn't nicely support posting
|
||||
- * events for zvols, it assumes events relate to vdevs or zios.
|
||||
- */
|
||||
-
|
||||
- return (0);
|
||||
-}
|
||||
-
|
||||
/*
|
||||
- * Set ZFS_PROP_VOLSIZE set entry point.
|
||||
+ * Set ZFS_PROP_VOLSIZE set entry point. Note that modifying the volume
|
||||
+ * size will result in a udev "change" event being generated.
|
||||
*/
|
||||
int
|
||||
zvol_set_volsize(const char *name, uint64_t volsize)
|
||||
{
|
||||
- zvol_state_t *zv = NULL;
|
||||
objset_t *os = NULL;
|
||||
- int error;
|
||||
- dmu_object_info_t *doi;
|
||||
+ struct gendisk *disk = NULL;
|
||||
uint64_t readonly;
|
||||
+ int error;
|
||||
boolean_t owned = B_FALSE;
|
||||
|
||||
error = dsl_prop_get_integer(name,
|
||||
@@ -443,7 +411,7 @@ zvol_set_volsize(const char *name, uint64_t volsize)
|
||||
if (readonly)
|
||||
return (SET_ERROR(EROFS));
|
||||
|
||||
- zv = zvol_find_by_name(name, RW_READER);
|
||||
+ zvol_state_t *zv = zvol_find_by_name(name, RW_READER);
|
||||
|
||||
ASSERT(zv == NULL || (MUTEX_HELD(&zv->zv_state_lock) &&
|
||||
RW_READ_HELD(&zv->zv_suspend_lock)));
|
||||
@@ -464,16 +432,18 @@ zvol_set_volsize(const char *name, uint64_t volsize)
|
||||
os = zv->zv_objset;
|
||||
}
|
||||
|
||||
- doi = kmem_alloc(sizeof (dmu_object_info_t), KM_SLEEP);
|
||||
+ dmu_object_info_t *doi = kmem_alloc(sizeof (*doi), KM_SLEEP);
|
||||
|
||||
if ((error = dmu_object_info(os, ZVOL_OBJ, doi)) ||
|
||||
(error = zvol_check_volsize(volsize, doi->doi_data_block_size)))
|
||||
goto out;
|
||||
|
||||
error = zvol_update_volsize(volsize, os);
|
||||
-
|
||||
- if (error == 0 && zv != NULL)
|
||||
- error = zvol_update_live_volsize(zv, volsize);
|
||||
+ if (error == 0 && zv != NULL) {
|
||||
+ zv->zv_volsize = volsize;
|
||||
+ zv->zv_changed = 1;
|
||||
+ disk = zv->zv_disk;
|
||||
+ }
|
||||
out:
|
||||
kmem_free(doi, sizeof (dmu_object_info_t));
|
||||
|
||||
@@ -488,6 +458,9 @@ out:
|
||||
if (zv != NULL)
|
||||
mutex_exit(&zv->zv_state_lock);
|
||||
|
||||
+ if (disk != NULL)
|
||||
+ revalidate_disk(disk);
|
||||
+
|
||||
return (SET_ERROR(error));
|
||||
}
|
||||
|
||||
@@ -543,8 +516,8 @@ zvol_set_volblocksize(const char *name, uint64_t volblocksize)
|
||||
if (zv == NULL)
|
||||
return (SET_ERROR(ENXIO));
|
||||
|
||||
- ASSERT(MUTEX_HELD(&zv->zv_state_lock) &&
|
||||
- RW_READ_HELD(&zv->zv_suspend_lock));
|
||||
+ ASSERT(MUTEX_HELD(&zv->zv_state_lock));
|
||||
+ ASSERT(RW_READ_HELD(&zv->zv_suspend_lock));
|
||||
|
||||
if (zv->zv_flags & ZVOL_RDONLY) {
|
||||
mutex_exit(&zv->zv_state_lock);
|
||||
@@ -1120,7 +1093,7 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio)
|
||||
static void
|
||||
zvol_insert(zvol_state_t *zv)
|
||||
{
|
||||
- ASSERT(MUTEX_HELD(&zvol_state_lock));
|
||||
+ ASSERT(RW_WRITE_HELD(&zvol_state_lock));
|
||||
ASSERT3U(MINOR(zv->zv_dev) & ZVOL_MINOR_MASK, ==, 0);
|
||||
list_insert_head(&zvol_state_list, zv);
|
||||
hlist_add_head(&zv->zv_hlink, ZVOL_HT_HEAD(zv->zv_hash));
|
||||
@@ -1132,7 +1105,7 @@ zvol_insert(zvol_state_t *zv)
|
||||
static void
|
||||
zvol_remove(zvol_state_t *zv)
|
||||
{
|
||||
- ASSERT(MUTEX_HELD(&zvol_state_lock));
|
||||
+ ASSERT(RW_WRITE_HELD(&zvol_state_lock));
|
||||
list_remove(&zvol_state_list, zv);
|
||||
hlist_del(&zv->zv_hlink);
|
||||
}
|
||||
@@ -1148,8 +1121,8 @@ zvol_setup_zv(zvol_state_t *zv)
|
||||
uint64_t ro;
|
||||
objset_t *os = zv->zv_objset;
|
||||
|
||||
- ASSERT(MUTEX_HELD(&zv->zv_state_lock) &&
|
||||
- RW_LOCK_HELD(&zv->zv_suspend_lock));
|
||||
+ ASSERT(MUTEX_HELD(&zv->zv_state_lock));
|
||||
+ ASSERT(RW_LOCK_HELD(&zv->zv_suspend_lock));
|
||||
|
||||
error = dsl_prop_get_integer(zv->zv_name, "readonly", &ro, NULL);
|
||||
if (error)
|
||||
@@ -1227,8 +1200,8 @@ zvol_suspend(const char *name)
|
||||
return (NULL);
|
||||
|
||||
/* block all I/O, release in zvol_resume. */
|
||||
- ASSERT(MUTEX_HELD(&zv->zv_state_lock) &&
|
||||
- RW_WRITE_HELD(&zv->zv_suspend_lock));
|
||||
+ ASSERT(MUTEX_HELD(&zv->zv_state_lock));
|
||||
+ ASSERT(RW_WRITE_HELD(&zv->zv_suspend_lock));
|
||||
|
||||
atomic_inc(&zv->zv_suspend_ref);
|
||||
|
||||
@@ -1349,9 +1322,7 @@ zvol_open(struct block_device *bdev, fmode_t flag)
|
||||
int error = 0;
|
||||
boolean_t drop_suspend = B_TRUE;
|
||||
|
||||
- ASSERT(!MUTEX_HELD(&zvol_state_lock));
|
||||
-
|
||||
- mutex_enter(&zvol_state_lock);
|
||||
+ rw_enter(&zvol_state_lock, RW_READER);
|
||||
/*
|
||||
* Obtain a copy of private_data under the zvol_state_lock to make
|
||||
* sure that either the result of zvol free code path setting
|
||||
@@ -1360,7 +1331,7 @@ zvol_open(struct block_device *bdev, fmode_t flag)
|
||||
*/
|
||||
zv = bdev->bd_disk->private_data;
|
||||
if (zv == NULL) {
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
return (SET_ERROR(-ENXIO));
|
||||
}
|
||||
|
||||
@@ -1384,7 +1355,7 @@ zvol_open(struct block_device *bdev, fmode_t flag)
|
||||
} else {
|
||||
drop_suspend = B_FALSE;
|
||||
}
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
|
||||
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
|
||||
ASSERT(zv->zv_open_count != 0 || RW_READ_HELD(&zv->zv_suspend_lock));
|
||||
@@ -1402,11 +1373,18 @@ zvol_open(struct block_device *bdev, fmode_t flag)
|
||||
|
||||
zv->zv_open_count++;
|
||||
|
||||
+ mutex_exit(&zv->zv_state_lock);
|
||||
+ if (drop_suspend)
|
||||
+ rw_exit(&zv->zv_suspend_lock);
|
||||
+
|
||||
check_disk_change(bdev);
|
||||
|
||||
+ return (0);
|
||||
+
|
||||
out_open_count:
|
||||
if (zv->zv_open_count == 0)
|
||||
zvol_last_close(zv);
|
||||
+
|
||||
out_mutex:
|
||||
mutex_exit(&zv->zv_state_lock);
|
||||
if (drop_suspend)
|
||||
@@ -1427,9 +1405,7 @@ zvol_release(struct gendisk *disk, fmode_t mode)
|
||||
zvol_state_t *zv;
|
||||
boolean_t drop_suspend = B_TRUE;
|
||||
|
||||
- ASSERT(!MUTEX_HELD(&zvol_state_lock));
|
||||
-
|
||||
- mutex_enter(&zvol_state_lock);
|
||||
+ rw_enter(&zvol_state_lock, RW_READER);
|
||||
zv = disk->private_data;
|
||||
|
||||
mutex_enter(&zv->zv_state_lock);
|
||||
@@ -1453,7 +1429,7 @@ zvol_release(struct gendisk *disk, fmode_t mode)
|
||||
} else {
|
||||
drop_suspend = B_FALSE;
|
||||
}
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
|
||||
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
|
||||
ASSERT(zv->zv_open_count != 1 || RW_READ_HELD(&zv->zv_suspend_lock));
|
||||
@@ -1479,7 +1455,7 @@ zvol_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
zvol_state_t *zv = bdev->bd_disk->private_data;
|
||||
int error = 0;
|
||||
|
||||
- ASSERT(zv && zv->zv_open_count > 0);
|
||||
+ ASSERT3U(zv->zv_open_count, >, 0);
|
||||
|
||||
switch (cmd) {
|
||||
case BLKFLSBUF:
|
||||
@@ -1519,23 +1495,62 @@ zvol_compat_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
#define zvol_compat_ioctl NULL
|
||||
#endif
|
||||
|
||||
+/*
|
||||
+ * Linux 2.6.38 preferred interface.
|
||||
+ */
|
||||
+#ifdef HAVE_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS
|
||||
+static unsigned int
|
||||
+zvol_check_events(struct gendisk *disk, unsigned int clearing)
|
||||
+{
|
||||
+ unsigned int mask = 0;
|
||||
+
|
||||
+ rw_enter(&zvol_state_lock, RW_READER);
|
||||
+
|
||||
+ zvol_state_t *zv = disk->private_data;
|
||||
+ if (zv != NULL) {
|
||||
+ mutex_enter(&zv->zv_state_lock);
|
||||
+ mask = zv->zv_changed ? DISK_EVENT_MEDIA_CHANGE : 0;
|
||||
+ zv->zv_changed = 0;
|
||||
+ mutex_exit(&zv->zv_state_lock);
|
||||
+ }
|
||||
+
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
+
|
||||
+ return (mask);
|
||||
+}
|
||||
+#else
|
||||
static int zvol_media_changed(struct gendisk *disk)
|
||||
{
|
||||
+ int changed = 0;
|
||||
+
|
||||
+ rw_enter(&zvol_state_lock, RW_READER);
|
||||
+
|
||||
zvol_state_t *zv = disk->private_data;
|
||||
+ if (zv != NULL) {
|
||||
+ mutex_enter(&zv->zv_state_lock);
|
||||
+ changed = zv->zv_changed;
|
||||
+ zv->zv_changed = 0;
|
||||
+ mutex_exit(&zv->zv_state_lock);
|
||||
+ }
|
||||
|
||||
- ASSERT(zv && zv->zv_open_count > 0);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
|
||||
- return (zv->zv_changed);
|
||||
+ return (changed);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static int zvol_revalidate_disk(struct gendisk *disk)
|
||||
{
|
||||
- zvol_state_t *zv = disk->private_data;
|
||||
+ rw_enter(&zvol_state_lock, RW_READER);
|
||||
|
||||
- ASSERT(zv && zv->zv_open_count > 0);
|
||||
+ zvol_state_t *zv = disk->private_data;
|
||||
+ if (zv != NULL) {
|
||||
+ mutex_enter(&zv->zv_state_lock);
|
||||
+ set_capacity(zv->zv_disk, zv->zv_volsize >> SECTOR_BITS);
|
||||
+ mutex_exit(&zv->zv_state_lock);
|
||||
+ }
|
||||
|
||||
- zv->zv_changed = 0;
|
||||
- set_capacity(zv->zv_disk, zv->zv_volsize >> 9);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
|
||||
return (0);
|
||||
}
|
||||
@@ -1552,7 +1567,7 @@ zvol_getgeo(struct block_device *bdev, struct hd_geometry *geo)
|
||||
zvol_state_t *zv = bdev->bd_disk->private_data;
|
||||
sector_t sectors;
|
||||
|
||||
- ASSERT(zv && zv->zv_open_count > 0);
|
||||
+ ASSERT3U(zv->zv_open_count, >, 0);
|
||||
|
||||
sectors = get_capacity(zv->zv_disk);
|
||||
|
||||
@@ -1585,68 +1600,20 @@ zvol_probe(dev_t dev, int *part, void *arg)
|
||||
return (kobj);
|
||||
}
|
||||
|
||||
-#ifdef HAVE_BDEV_BLOCK_DEVICE_OPERATIONS
|
||||
static struct block_device_operations zvol_ops = {
|
||||
.open = zvol_open,
|
||||
.release = zvol_release,
|
||||
.ioctl = zvol_ioctl,
|
||||
.compat_ioctl = zvol_compat_ioctl,
|
||||
- .media_changed = zvol_media_changed,
|
||||
- .revalidate_disk = zvol_revalidate_disk,
|
||||
- .getgeo = zvol_getgeo,
|
||||
- .owner = THIS_MODULE,
|
||||
-};
|
||||
-
|
||||
-#else /* HAVE_BDEV_BLOCK_DEVICE_OPERATIONS */
|
||||
-
|
||||
-static int
|
||||
-zvol_open_by_inode(struct inode *inode, struct file *file)
|
||||
-{
|
||||
- return (zvol_open(inode->i_bdev, file->f_mode));
|
||||
-}
|
||||
-
|
||||
-static int
|
||||
-zvol_release_by_inode(struct inode *inode, struct file *file)
|
||||
-{
|
||||
- return (zvol_release(inode->i_bdev->bd_disk, file->f_mode));
|
||||
-}
|
||||
-
|
||||
-static int
|
||||
-zvol_ioctl_by_inode(struct inode *inode, struct file *file,
|
||||
- unsigned int cmd, unsigned long arg)
|
||||
-{
|
||||
- if (file == NULL || inode == NULL)
|
||||
- return (SET_ERROR(-EINVAL));
|
||||
-
|
||||
- return (zvol_ioctl(inode->i_bdev, file->f_mode, cmd, arg));
|
||||
-}
|
||||
-
|
||||
-#ifdef CONFIG_COMPAT
|
||||
-static long
|
||||
-zvol_compat_ioctl_by_inode(struct file *file,
|
||||
- unsigned int cmd, unsigned long arg)
|
||||
-{
|
||||
- if (file == NULL)
|
||||
- return (SET_ERROR(-EINVAL));
|
||||
-
|
||||
- return (zvol_compat_ioctl(file->f_dentry->d_inode->i_bdev,
|
||||
- file->f_mode, cmd, arg));
|
||||
-}
|
||||
+#ifdef HAVE_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS
|
||||
+ .check_events = zvol_check_events,
|
||||
#else
|
||||
-#define zvol_compat_ioctl_by_inode NULL
|
||||
-#endif
|
||||
-
|
||||
-static struct block_device_operations zvol_ops = {
|
||||
- .open = zvol_open_by_inode,
|
||||
- .release = zvol_release_by_inode,
|
||||
- .ioctl = zvol_ioctl_by_inode,
|
||||
- .compat_ioctl = zvol_compat_ioctl_by_inode,
|
||||
.media_changed = zvol_media_changed,
|
||||
+#endif
|
||||
.revalidate_disk = zvol_revalidate_disk,
|
||||
.getgeo = zvol_getgeo,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
-#endif /* HAVE_BDEV_BLOCK_DEVICE_OPERATIONS */
|
||||
|
||||
/*
|
||||
* Allocate memory for a new zvol_state_t and setup the required
|
||||
@@ -1699,6 +1666,10 @@ zvol_alloc(dev_t dev, const char *name)
|
||||
rw_init(&zv->zv_suspend_lock, NULL, RW_DEFAULT, NULL);
|
||||
|
||||
zv->zv_disk->major = zvol_major;
|
||||
+#ifdef HAVE_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS
|
||||
+ zv->zv_disk->events = DISK_EVENT_MEDIA_CHANGE;
|
||||
+#endif
|
||||
+
|
||||
if (volmode == ZFS_VOLMODE_DEV) {
|
||||
/*
|
||||
* ZFS_VOLMODE_DEV disable partitioning on ZVOL devices: set
|
||||
@@ -1743,7 +1714,6 @@ zvol_free(void *arg)
|
||||
{
|
||||
zvol_state_t *zv = arg;
|
||||
|
||||
- ASSERT(!MUTEX_HELD(&zvol_state_lock));
|
||||
ASSERT(!RW_LOCK_HELD(&zv->zv_suspend_lock));
|
||||
ASSERT(!MUTEX_HELD(&zv->zv_state_lock));
|
||||
ASSERT(zv->zv_open_count == 0);
|
||||
@@ -1870,9 +1840,9 @@ out_doi:
|
||||
kmem_free(doi, sizeof (dmu_object_info_t));
|
||||
|
||||
if (error == 0) {
|
||||
- mutex_enter(&zvol_state_lock);
|
||||
+ rw_enter(&zvol_state_lock, RW_WRITER);
|
||||
zvol_insert(zv);
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
add_disk(zv->zv_disk);
|
||||
} else {
|
||||
ida_simple_remove(&zvol_ida, idx);
|
||||
@@ -1889,7 +1859,7 @@ zvol_rename_minor(zvol_state_t *zv, const char *newname)
|
||||
{
|
||||
int readonly = get_disk_ro(zv->zv_disk);
|
||||
|
||||
- ASSERT(MUTEX_HELD(&zvol_state_lock));
|
||||
+ ASSERT(RW_LOCK_HELD(&zvol_state_lock));
|
||||
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
|
||||
|
||||
strlcpy(zv->zv_name, newname, sizeof (zv->zv_name));
|
||||
@@ -2129,7 +2099,7 @@ zvol_remove_minors_impl(const char *name)
|
||||
list_create(&free_list, sizeof (zvol_state_t),
|
||||
offsetof(zvol_state_t, zv_next));
|
||||
|
||||
- mutex_enter(&zvol_state_lock);
|
||||
+ rw_enter(&zvol_state_lock, RW_WRITER);
|
||||
|
||||
for (zv = list_head(&zvol_state_list); zv != NULL; zv = zv_next) {
|
||||
zv_next = list_next(&zvol_state_list, zv);
|
||||
@@ -2154,15 +2124,15 @@ zvol_remove_minors_impl(const char *name)
|
||||
zvol_remove(zv);
|
||||
|
||||
/*
|
||||
- * clear this while holding zvol_state_lock so
|
||||
- * zvol_open won't open it
|
||||
+ * Cleared while holding zvol_state_lock as a writer
|
||||
+ * which will prevent zvol_open() from opening it.
|
||||
*/
|
||||
zv->zv_disk->private_data = NULL;
|
||||
|
||||
/* Drop zv_state_lock before zvol_free() */
|
||||
mutex_exit(&zv->zv_state_lock);
|
||||
|
||||
- /* try parallel zv_free, if failed do it in place */
|
||||
+ /* Try parallel zv_free, if failed do it in place */
|
||||
t = taskq_dispatch(system_taskq, zvol_free, zv,
|
||||
TQ_SLEEP);
|
||||
if (t == TASKQID_INVALID)
|
||||
@@ -2173,11 +2143,9 @@ zvol_remove_minors_impl(const char *name)
|
||||
mutex_exit(&zv->zv_state_lock);
|
||||
}
|
||||
}
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
|
||||
- /*
|
||||
- * Drop zvol_state_lock before calling zvol_free()
|
||||
- */
|
||||
+ /* Drop zvol_state_lock before calling zvol_free() */
|
||||
while ((zv = list_head(&free_list)) != NULL) {
|
||||
list_remove(&free_list, zv);
|
||||
zvol_free(zv);
|
||||
@@ -2196,7 +2164,7 @@ zvol_remove_minor_impl(const char *name)
|
||||
if (zvol_inhibit_dev)
|
||||
return;
|
||||
|
||||
- mutex_enter(&zvol_state_lock);
|
||||
+ rw_enter(&zvol_state_lock, RW_WRITER);
|
||||
|
||||
for (zv = list_head(&zvol_state_list); zv != NULL; zv = zv_next) {
|
||||
zv_next = list_next(&zvol_state_list, zv);
|
||||
@@ -2216,7 +2184,10 @@ zvol_remove_minor_impl(const char *name)
|
||||
}
|
||||
zvol_remove(zv);
|
||||
|
||||
- /* clear this so zvol_open won't open it */
|
||||
+ /*
|
||||
+ * Cleared while holding zvol_state_lock as a writer
|
||||
+ * which will prevent zvol_open() from opening it.
|
||||
+ */
|
||||
zv->zv_disk->private_data = NULL;
|
||||
|
||||
mutex_exit(&zv->zv_state_lock);
|
||||
@@ -2227,7 +2198,7 @@ zvol_remove_minor_impl(const char *name)
|
||||
}
|
||||
|
||||
/* Drop zvol_state_lock before calling zvol_free() */
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
|
||||
if (zv != NULL)
|
||||
zvol_free(zv);
|
||||
@@ -2248,7 +2219,7 @@ zvol_rename_minors_impl(const char *oldname, const char *newname)
|
||||
oldnamelen = strlen(oldname);
|
||||
newnamelen = strlen(newname);
|
||||
|
||||
- mutex_enter(&zvol_state_lock);
|
||||
+ rw_enter(&zvol_state_lock, RW_READER);
|
||||
|
||||
for (zv = list_head(&zvol_state_list); zv != NULL; zv = zv_next) {
|
||||
zv_next = list_next(&zvol_state_list, zv);
|
||||
@@ -2276,7 +2247,7 @@ zvol_rename_minors_impl(const char *oldname, const char *newname)
|
||||
mutex_exit(&zv->zv_state_lock);
|
||||
}
|
||||
|
||||
- mutex_exit(&zvol_state_lock);
|
||||
+ rw_exit(&zvol_state_lock);
|
||||
}
|
||||
|
||||
typedef struct zvol_snapdev_cb_arg {
|
||||
@@ -2653,7 +2624,7 @@ zvol_init(void)
|
||||
|
||||
list_create(&zvol_state_list, sizeof (zvol_state_t),
|
||||
offsetof(zvol_state_t, zv_next));
|
||||
- mutex_init(&zvol_state_lock, NULL, MUTEX_DEFAULT, NULL);
|
||||
+ rw_init(&zvol_state_lock, NULL, RW_DEFAULT, NULL);
|
||||
ida_init(&zvol_ida);
|
||||
|
||||
zvol_taskq = taskq_create(ZVOL_DRIVER, threads, maxclsyspri,
|
||||
@@ -2690,7 +2661,7 @@ out_taskq:
|
||||
taskq_destroy(zvol_taskq);
|
||||
out:
|
||||
ida_destroy(&zvol_ida);
|
||||
- mutex_destroy(&zvol_state_lock);
|
||||
+ rw_destroy(&zvol_state_lock);
|
||||
list_destroy(&zvol_state_list);
|
||||
|
||||
return (SET_ERROR(error));
|
||||
@@ -2707,7 +2678,7 @@ zvol_fini(void)
|
||||
|
||||
taskq_destroy(zvol_taskq);
|
||||
list_destroy(&zvol_state_list);
|
||||
- mutex_destroy(&zvol_state_lock);
|
||||
+ rw_destroy(&zvol_state_lock);
|
||||
|
||||
ida_destroy(&zvol_ida);
|
||||
}
|
||||
@@ -1,368 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Prakash Surya <prakash.surya@delphix.com>
|
||||
Date: Mon, 8 Jan 2018 13:45:53 -0800
|
||||
Subject: [PATCH] OpenZFS 8997 - ztest assertion failure in zil_lwb_write_issue
|
||||
|
||||
PROBLEM
|
||||
=======
|
||||
|
||||
When `dmu_tx_assign` is called from `zil_lwb_write_issue`, it's possible
|
||||
for either `ERESTART` or `EIO` to be returned.
|
||||
|
||||
If `ERESTART` is returned, this will cause an assertion to fail directly
|
||||
in `zil_lwb_write_issue`, where the code assumes the return value is
|
||||
`EIO` if `dmu_tx_assign` returns a non-zero value. This can occur if the
|
||||
SPA is suspended when `dmu_tx_assign` is called, and most often occurs
|
||||
when running `zloop`.
|
||||
|
||||
If `EIO` is returned, this can cause assertions to fail elsewhere in the
|
||||
ZIL code. For example, `zil_commit_waiter_timeout` contains the
|
||||
following logic:
|
||||
|
||||
lwb_t *nlwb = zil_lwb_write_issue(zilog, lwb);
|
||||
ASSERT3S(lwb->lwb_state, !=, LWB_STATE_OPENED);
|
||||
|
||||
In this case, if `dmu_tx_assign` returned `EIO` from within
|
||||
`zil_lwb_write_issue`, the `lwb` variable passed in will not be issued
|
||||
to disk. Thus, it's `lwb_state` field will remain `LWB_STATE_OPENED` and
|
||||
this assertion will fail. `zil_commit_waiter_timeout` assumes that after
|
||||
it calls `zil_lwb_write_issue`, the `lwb` will be issued to disk, and
|
||||
doesn't handle the case where this is not true; i.e. it doesn't handle
|
||||
the case where `dmu_tx_assign` returns `EIO`.
|
||||
|
||||
SOLUTION
|
||||
========
|
||||
|
||||
This change modifies the `dmu_tx_assign` function such that `txg_how` is
|
||||
a bitmask, rather than of the `txg_how_t` enum type. Now, the previous
|
||||
`TXG_WAITED` semantics can be used via `TXG_NOTHROTTLE`, along with
|
||||
specifying either `TXG_NOWAIT` or `TXG_WAIT` semantics.
|
||||
|
||||
Previously, when `TXG_WAITED` was specified, `TXG_NOWAIT` semantics was
|
||||
automatically invoked. This was not ideal when using `TXG_WAITED` within
|
||||
`zil_lwb_write_issued`, leading the problem described above. Rather, we
|
||||
want to achieve the semantics of `TXG_WAIT`, while also preventing the
|
||||
`tx` from being penalized via the dirty delay throttling.
|
||||
|
||||
With this change, `zil_lwb_write_issued` can acheive the semtantics that
|
||||
it requires by passing in the value `TXG_WAIT | TXG_NOTHROTTLE` to
|
||||
`dmu_tx_assign`.
|
||||
|
||||
Further, consumers of `dmu_tx_assign` wishing to achieve the old
|
||||
`TXG_WAITED` semantics can pass in the value `TXG_NOWAIT | TXG_NOTHROTTLE`.
|
||||
|
||||
Authored by: Prakash Surya <prakash.surya@delphix.com>
|
||||
Approved by: Robert Mustacchi <rm@joyent.com>
|
||||
Reviewed by: Matt Ahrens <mahrens@delphix.com>
|
||||
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
|
||||
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
|
||||
Porting Notes:
|
||||
- Additionally updated `zfs_tmpfile` to use `TXG_NOTHROTTLE`
|
||||
|
||||
OpenZFS-issue: https://www.illumos.org/issues/8997
|
||||
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/19ea6cb0f9
|
||||
Closes #7084
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
include/sys/dmu.h | 15 +++++++------
|
||||
include/sys/dmu_tx.h | 8 +++----
|
||||
module/zfs/dmu_tx.c | 57 ++++++++++++++++++++++++++------------------------
|
||||
module/zfs/zfs_vnops.c | 21 ++++++++++---------
|
||||
module/zfs/zil.c | 10 ++++++++-
|
||||
5 files changed, 63 insertions(+), 48 deletions(-)
|
||||
|
||||
diff --git a/include/sys/dmu.h b/include/sys/dmu.h
|
||||
index 755a9056..5b355afb 100644
|
||||
--- a/include/sys/dmu.h
|
||||
+++ b/include/sys/dmu.h
|
||||
@@ -227,11 +227,14 @@ typedef enum dmu_object_type {
|
||||
DMU_OTN_ZAP_METADATA = DMU_OT(DMU_BSWAP_ZAP, B_TRUE),
|
||||
} dmu_object_type_t;
|
||||
|
||||
-typedef enum txg_how {
|
||||
- TXG_WAIT = 1,
|
||||
- TXG_NOWAIT,
|
||||
- TXG_WAITED,
|
||||
-} txg_how_t;
|
||||
+/*
|
||||
+ * These flags are intended to be used to specify the "txg_how"
|
||||
+ * parameter when calling the dmu_tx_assign() function. See the comment
|
||||
+ * above dmu_tx_assign() for more details on the meaning of these flags.
|
||||
+ */
|
||||
+#define TXG_NOWAIT (0ULL)
|
||||
+#define TXG_WAIT (1ULL<<0)
|
||||
+#define TXG_NOTHROTTLE (1ULL<<1)
|
||||
|
||||
void byteswap_uint64_array(void *buf, size_t size);
|
||||
void byteswap_uint32_array(void *buf, size_t size);
|
||||
@@ -694,7 +697,7 @@ void dmu_tx_hold_spill(dmu_tx_t *tx, uint64_t object);
|
||||
void dmu_tx_hold_sa(dmu_tx_t *tx, struct sa_handle *hdl, boolean_t may_grow);
|
||||
void dmu_tx_hold_sa_create(dmu_tx_t *tx, int total_size);
|
||||
void dmu_tx_abort(dmu_tx_t *tx);
|
||||
-int dmu_tx_assign(dmu_tx_t *tx, enum txg_how txg_how);
|
||||
+int dmu_tx_assign(dmu_tx_t *tx, uint64_t txg_how);
|
||||
void dmu_tx_wait(dmu_tx_t *tx);
|
||||
void dmu_tx_commit(dmu_tx_t *tx);
|
||||
void dmu_tx_mark_netfree(dmu_tx_t *tx);
|
||||
diff --git a/include/sys/dmu_tx.h b/include/sys/dmu_tx.h
|
||||
index d82a7931..74b7e111 100644
|
||||
--- a/include/sys/dmu_tx.h
|
||||
+++ b/include/sys/dmu_tx.h
|
||||
@@ -67,9 +67,6 @@ struct dmu_tx {
|
||||
/* placeholder for syncing context, doesn't need specific holds */
|
||||
boolean_t tx_anyobj;
|
||||
|
||||
- /* has this transaction already been delayed? */
|
||||
- boolean_t tx_waited;
|
||||
-
|
||||
/* transaction is marked as being a "net free" of space */
|
||||
boolean_t tx_netfree;
|
||||
|
||||
@@ -79,6 +76,9 @@ struct dmu_tx {
|
||||
/* need to wait for sufficient dirty space */
|
||||
boolean_t tx_wait_dirty;
|
||||
|
||||
+ /* has this transaction already been delayed? */
|
||||
+ boolean_t tx_dirty_delayed;
|
||||
+
|
||||
int tx_err;
|
||||
};
|
||||
|
||||
@@ -138,7 +138,7 @@ extern dmu_tx_stats_t dmu_tx_stats;
|
||||
* These routines are defined in dmu.h, and are called by the user.
|
||||
*/
|
||||
dmu_tx_t *dmu_tx_create(objset_t *dd);
|
||||
-int dmu_tx_assign(dmu_tx_t *tx, txg_how_t txg_how);
|
||||
+int dmu_tx_assign(dmu_tx_t *tx, uint64_t txg_how);
|
||||
void dmu_tx_commit(dmu_tx_t *tx);
|
||||
void dmu_tx_abort(dmu_tx_t *tx);
|
||||
uint64_t dmu_tx_get_txg(dmu_tx_t *tx);
|
||||
diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c
|
||||
index c3cc03a6..6ebff267 100644
|
||||
--- a/module/zfs/dmu_tx.c
|
||||
+++ b/module/zfs/dmu_tx.c
|
||||
@@ -854,7 +854,7 @@ dmu_tx_delay(dmu_tx_t *tx, uint64_t dirty)
|
||||
* decreasing performance.
|
||||
*/
|
||||
static int
|
||||
-dmu_tx_try_assign(dmu_tx_t *tx, txg_how_t txg_how)
|
||||
+dmu_tx_try_assign(dmu_tx_t *tx, uint64_t txg_how)
|
||||
{
|
||||
spa_t *spa = tx->tx_pool->dp_spa;
|
||||
|
||||
@@ -878,13 +878,13 @@ dmu_tx_try_assign(dmu_tx_t *tx, txg_how_t txg_how)
|
||||
* of the failuremode setting.
|
||||
*/
|
||||
if (spa_get_failmode(spa) == ZIO_FAILURE_MODE_CONTINUE &&
|
||||
- txg_how != TXG_WAIT)
|
||||
+ !(txg_how & TXG_WAIT))
|
||||
return (SET_ERROR(EIO));
|
||||
|
||||
return (SET_ERROR(ERESTART));
|
||||
}
|
||||
|
||||
- if (!tx->tx_waited &&
|
||||
+ if (!tx->tx_dirty_delayed &&
|
||||
dsl_pool_need_dirty_delay(tx->tx_pool)) {
|
||||
tx->tx_wait_dirty = B_TRUE;
|
||||
DMU_TX_STAT_BUMP(dmu_tx_dirty_delay);
|
||||
@@ -976,41 +976,44 @@ dmu_tx_unassign(dmu_tx_t *tx)
|
||||
}
|
||||
|
||||
/*
|
||||
- * Assign tx to a transaction group. txg_how can be one of:
|
||||
+ * Assign tx to a transaction group; txg_how is a bitmask:
|
||||
*
|
||||
- * (1) TXG_WAIT. If the current open txg is full, waits until there's
|
||||
- * a new one. This should be used when you're not holding locks.
|
||||
- * It will only fail if we're truly out of space (or over quota).
|
||||
+ * If TXG_WAIT is set and the currently open txg is full, this function
|
||||
+ * will wait until there's a new txg. This should be used when no locks
|
||||
+ * are being held. With this bit set, this function will only fail if
|
||||
+ * we're truly out of space (or over quota).
|
||||
*
|
||||
- * (2) TXG_NOWAIT. If we can't assign into the current open txg without
|
||||
- * blocking, returns immediately with ERESTART. This should be used
|
||||
- * whenever you're holding locks. On an ERESTART error, the caller
|
||||
- * should drop locks, do a dmu_tx_wait(tx), and try again.
|
||||
+ * If TXG_WAIT is *not* set and we can't assign into the currently open
|
||||
+ * txg without blocking, this function will return immediately with
|
||||
+ * ERESTART. This should be used whenever locks are being held. On an
|
||||
+ * ERESTART error, the caller should drop all locks, call dmu_tx_wait(),
|
||||
+ * and try again.
|
||||
*
|
||||
- * (3) TXG_WAITED. Like TXG_NOWAIT, but indicates that dmu_tx_wait()
|
||||
- * has already been called on behalf of this operation (though
|
||||
- * most likely on a different tx).
|
||||
+ * If TXG_NOTHROTTLE is set, this indicates that this tx should not be
|
||||
+ * delayed due on the ZFS Write Throttle (see comments in dsl_pool.c for
|
||||
+ * details on the throttle). This is used by the VFS operations, after
|
||||
+ * they have already called dmu_tx_wait() (though most likely on a
|
||||
+ * different tx).
|
||||
*/
|
||||
int
|
||||
-dmu_tx_assign(dmu_tx_t *tx, txg_how_t txg_how)
|
||||
+dmu_tx_assign(dmu_tx_t *tx, uint64_t txg_how)
|
||||
{
|
||||
int err;
|
||||
|
||||
ASSERT(tx->tx_txg == 0);
|
||||
- ASSERT(txg_how == TXG_WAIT || txg_how == TXG_NOWAIT ||
|
||||
- txg_how == TXG_WAITED);
|
||||
+ ASSERT0(txg_how & ~(TXG_WAIT | TXG_NOTHROTTLE));
|
||||
ASSERT(!dsl_pool_sync_context(tx->tx_pool));
|
||||
|
||||
- if (txg_how == TXG_WAITED)
|
||||
- tx->tx_waited = B_TRUE;
|
||||
-
|
||||
/* If we might wait, we must not hold the config lock. */
|
||||
- ASSERT(txg_how != TXG_WAIT || !dsl_pool_config_held(tx->tx_pool));
|
||||
+ IMPLY((txg_how & TXG_WAIT), !dsl_pool_config_held(tx->tx_pool));
|
||||
+
|
||||
+ if ((txg_how & TXG_NOTHROTTLE))
|
||||
+ tx->tx_dirty_delayed = B_TRUE;
|
||||
|
||||
while ((err = dmu_tx_try_assign(tx, txg_how)) != 0) {
|
||||
dmu_tx_unassign(tx);
|
||||
|
||||
- if (err != ERESTART || txg_how != TXG_WAIT)
|
||||
+ if (err != ERESTART || !(txg_how & TXG_WAIT))
|
||||
return (err);
|
||||
|
||||
dmu_tx_wait(tx);
|
||||
@@ -1054,12 +1057,12 @@ dmu_tx_wait(dmu_tx_t *tx)
|
||||
tx->tx_wait_dirty = B_FALSE;
|
||||
|
||||
/*
|
||||
- * Note: setting tx_waited only has effect if the caller
|
||||
- * used TX_WAIT. Otherwise they are going to destroy
|
||||
- * this tx and try again. The common case, zfs_write(),
|
||||
- * uses TX_WAIT.
|
||||
+ * Note: setting tx_dirty_delayed only has effect if the
|
||||
+ * caller used TX_WAIT. Otherwise they are going to
|
||||
+ * destroy this tx and try again. The common case,
|
||||
+ * zfs_write(), uses TX_WAIT.
|
||||
*/
|
||||
- tx->tx_waited = B_TRUE;
|
||||
+ tx->tx_dirty_delayed = B_TRUE;
|
||||
} else if (spa_suspended(spa) || tx->tx_lasttried_txg == 0) {
|
||||
/*
|
||||
* If the pool is suspended we need to wait until it
|
||||
diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
|
||||
index 34ea751c..4805f897 100644
|
||||
--- a/module/zfs/zfs_vnops.c
|
||||
+++ b/module/zfs/zfs_vnops.c
|
||||
@@ -129,7 +129,7 @@
|
||||
*
|
||||
* If dmu_tx_assign() returns ERESTART and zfsvfs->z_assign is TXG_NOWAIT,
|
||||
* then drop all locks, call dmu_tx_wait(), and try again. On subsequent
|
||||
- * calls to dmu_tx_assign(), pass TXG_WAITED rather than TXG_NOWAIT,
|
||||
+ * calls to dmu_tx_assign(), pass TXG_NOTHROTTLE in addition to TXG_NOWAIT,
|
||||
* to indicate that this operation has already called dmu_tx_wait().
|
||||
* This will ensure that we don't retry forever, waiting a short bit
|
||||
* each time.
|
||||
@@ -154,7 +154,7 @@
|
||||
* rw_enter(...); // grab any other locks you need
|
||||
* tx = dmu_tx_create(...); // get DMU tx
|
||||
* dmu_tx_hold_*(); // hold each object you might modify
|
||||
- * error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
|
||||
+ * error = dmu_tx_assign(tx, (waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT);
|
||||
* if (error) {
|
||||
* rw_exit(...); // drop locks
|
||||
* zfs_dirent_unlock(dl); // unlock directory entry
|
||||
@@ -1427,7 +1427,8 @@ top:
|
||||
dmu_tx_hold_write(tx, DMU_NEW_OBJECT,
|
||||
0, acl_ids.z_aclp->z_acl_bytes);
|
||||
}
|
||||
- error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
|
||||
+ error = dmu_tx_assign(tx,
|
||||
+ (waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT);
|
||||
if (error) {
|
||||
zfs_dirent_unlock(dl);
|
||||
if (error == ERESTART) {
|
||||
@@ -1602,7 +1603,7 @@ top:
|
||||
dmu_tx_hold_write(tx, DMU_NEW_OBJECT,
|
||||
0, acl_ids.z_aclp->z_acl_bytes);
|
||||
}
|
||||
- error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
|
||||
+ error = dmu_tx_assign(tx, (waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT);
|
||||
if (error) {
|
||||
if (error == ERESTART) {
|
||||
waited = B_TRUE;
|
||||
@@ -1775,7 +1776,7 @@ top:
|
||||
*/
|
||||
dmu_tx_mark_netfree(tx);
|
||||
|
||||
- error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
|
||||
+ error = dmu_tx_assign(tx, (waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT);
|
||||
if (error) {
|
||||
zfs_dirent_unlock(dl);
|
||||
if (error == ERESTART) {
|
||||
@@ -2017,7 +2018,7 @@ top:
|
||||
dmu_tx_hold_sa_create(tx, acl_ids.z_aclp->z_acl_bytes +
|
||||
ZFS_SA_BASE_ATTR_SIZE);
|
||||
|
||||
- error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
|
||||
+ error = dmu_tx_assign(tx, (waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT);
|
||||
if (error) {
|
||||
zfs_dirent_unlock(dl);
|
||||
if (error == ERESTART) {
|
||||
@@ -2156,7 +2157,7 @@ top:
|
||||
zfs_sa_upgrade_txholds(tx, zp);
|
||||
zfs_sa_upgrade_txholds(tx, dzp);
|
||||
dmu_tx_mark_netfree(tx);
|
||||
- error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
|
||||
+ error = dmu_tx_assign(tx, (waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT);
|
||||
if (error) {
|
||||
rw_exit(&zp->z_parent_lock);
|
||||
rw_exit(&zp->z_name_lock);
|
||||
@@ -3623,7 +3624,7 @@ top:
|
||||
|
||||
zfs_sa_upgrade_txholds(tx, szp);
|
||||
dmu_tx_hold_zap(tx, zfsvfs->z_unlinkedobj, FALSE, NULL);
|
||||
- error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
|
||||
+ error = dmu_tx_assign(tx, (waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT);
|
||||
if (error) {
|
||||
if (zl != NULL)
|
||||
zfs_rename_unlock(&zl);
|
||||
@@ -3815,7 +3816,7 @@ top:
|
||||
}
|
||||
if (fuid_dirtied)
|
||||
zfs_fuid_txhold(zfsvfs, tx);
|
||||
- error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
|
||||
+ error = dmu_tx_assign(tx, (waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT);
|
||||
if (error) {
|
||||
zfs_dirent_unlock(dl);
|
||||
if (error == ERESTART) {
|
||||
@@ -4041,7 +4042,7 @@ top:
|
||||
|
||||
zfs_sa_upgrade_txholds(tx, szp);
|
||||
zfs_sa_upgrade_txholds(tx, dzp);
|
||||
- error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
|
||||
+ error = dmu_tx_assign(tx, (waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT);
|
||||
if (error) {
|
||||
zfs_dirent_unlock(dl);
|
||||
if (error == ERESTART) {
|
||||
diff --git a/module/zfs/zil.c b/module/zfs/zil.c
|
||||
index 645b1d4d..a2bbdcb9 100644
|
||||
--- a/module/zfs/zil.c
|
||||
+++ b/module/zfs/zil.c
|
||||
@@ -1009,7 +1009,15 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb)
|
||||
* to clean up in the event of allocation failure or I/O failure.
|
||||
*/
|
||||
tx = dmu_tx_create(zilog->zl_os);
|
||||
- VERIFY(dmu_tx_assign(tx, TXG_WAIT) == 0);
|
||||
+
|
||||
+ /*
|
||||
+ * Since we are not going to create any new dirty data, and we
|
||||
+ * can even help with clearing the existing dirty data, we
|
||||
+ * should not be subject to the dirty data based delays. We
|
||||
+ * use TXG_NOTHROTTLE to bypass the delay mechanism.
|
||||
+ */
|
||||
+ VERIFY0(dmu_tx_assign(tx, TXG_WAIT | TXG_NOTHROTTLE));
|
||||
+
|
||||
dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx);
|
||||
txg = dmu_tx_get_txg(tx);
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Olaf Faaland <faaland1@llnl.gov>
|
||||
Date: Fri, 6 Apr 2018 13:29:11 -0700
|
||||
Subject: [PATCH] Fix divide-by-zero in mmp_delay_update()
|
||||
|
||||
vdev_count_leaves() in the denominator may return 0, caught by Coverity.
|
||||
Introduced by
|
||||
|
||||
* 533ea04 Update mmp_delay on sync or skipped, failed write
|
||||
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
|
||||
Reviewed-by: George Melikov <mail@gmelikov.ru>
|
||||
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
|
||||
Closes #7391
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
module/zfs/mmp.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/module/zfs/mmp.c b/module/zfs/mmp.c
|
||||
index 1ae5f31f..3b74a6b6 100644
|
||||
--- a/module/zfs/mmp.c
|
||||
+++ b/module/zfs/mmp.c
|
||||
@@ -327,7 +327,7 @@ mmp_delay_update(spa_t *spa, boolean_t write_completed)
|
||||
*/
|
||||
if (delay < mts->mmp_delay) {
|
||||
hrtime_t min_delay = MSEC2NSEC(zfs_multihost_interval) /
|
||||
- vdev_count_leaves(spa);
|
||||
+ MAX(1, vdev_count_leaves(spa));
|
||||
mts->mmp_delay = MAX(((delay + mts->mmp_delay * 127) / 128),
|
||||
min_delay);
|
||||
}
|
||||
@@ -1,867 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Chunwei Chen <tuxoko@gmail.com>
|
||||
Date: Wed, 18 Apr 2018 14:19:50 -0700
|
||||
Subject: [PATCH] Fix ENOSPC in "Handle zap_add() failures in ..."
|
||||
|
||||
Commit cc63068 caused ENOSPC error when copy a large amount of files
|
||||
between two directories. The reason is that the patch limits zap leaf
|
||||
expansion to 2 retries, and return ENOSPC when failed.
|
||||
|
||||
The intent for limiting retries is to prevent pointlessly growing table
|
||||
to max size when adding a block full of entries with same name in
|
||||
different case in mixed mode. However, it turns out we cannot use any
|
||||
limit on the retry. When we copy files from one directory in readdir
|
||||
order, we are copying in hash order, one leaf block at a time. Which
|
||||
means that if the leaf block in source directory has expanded 6 times,
|
||||
and you copy those entries in that block, by the time you need to expand
|
||||
the leaf in destination directory, you need to expand it 6 times in one
|
||||
go. So any limit on the retry will result in error where it shouldn't.
|
||||
|
||||
Note that while we do use different salt for different directories, it
|
||||
seems that the salt/hash function doesn't provide enough randomization
|
||||
to the hash distance to prevent this from happening.
|
||||
|
||||
Since cc63068 has already been reverted. This patch adds it back and
|
||||
removes the retry limit.
|
||||
|
||||
Also, as it turn out, failing on zap_add() has a serious side effect for
|
||||
mzap_upgrade(). When upgrading from micro zap to fat zap, it will
|
||||
call zap_add() to transfer entries one at a time. If it hit any error
|
||||
halfway through, the remaining entries will be lost, causing those files
|
||||
to become orphan. This patch add a VERIFY to catch it.
|
||||
|
||||
Reviewed-by: Sanjeev Bagewadi <sanjeev.bagewadi@gmail.com>
|
||||
Reviewed-by: Richard Yao <ryao@gentoo.org>
|
||||
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
|
||||
Reviewed-by: Albert Lee <trisk@forkgnu.org>
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
|
||||
Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
|
||||
Closes #7401
|
||||
Closes #7421
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
configure.ac | 1 +
|
||||
include/sys/zap_leaf.h | 15 ++-
|
||||
module/zfs/zap.c | 10 +-
|
||||
module/zfs/zap_leaf.c | 2 +-
|
||||
module/zfs/zap_micro.c | 47 ++++++-
|
||||
module/zfs/zfs_dir.c | 29 ++++-
|
||||
module/zfs/zfs_vnops.c | 74 ++++++++---
|
||||
tests/runfiles/linux.run | 6 +-
|
||||
tests/zfs-tests/tests/functional/Makefile.am | 1 +
|
||||
.../tests/functional/casenorm/Makefile.am | 1 +
|
||||
.../functional/casenorm/mixed_create_failure.ksh | 136 +++++++++++++++++++++
|
||||
.../zfs-tests/tests/functional/cp_files/.gitignore | 1 +
|
||||
.../tests/functional/cp_files/Makefile.am | 13 ++
|
||||
.../tests/functional/cp_files/cleanup.ksh | 34 ++++++
|
||||
.../zfs-tests/tests/functional/cp_files/cp_files.c | 58 +++++++++
|
||||
.../tests/functional/cp_files/cp_files_001_pos.ksh | 74 +++++++++++
|
||||
.../zfs-tests/tests/functional/cp_files/setup.ksh | 35 ++++++
|
||||
17 files changed, 500 insertions(+), 37 deletions(-)
|
||||
create mode 100755 tests/zfs-tests/tests/functional/casenorm/mixed_create_failure.ksh
|
||||
create mode 100644 tests/zfs-tests/tests/functional/cp_files/.gitignore
|
||||
create mode 100644 tests/zfs-tests/tests/functional/cp_files/Makefile.am
|
||||
create mode 100755 tests/zfs-tests/tests/functional/cp_files/cleanup.ksh
|
||||
create mode 100644 tests/zfs-tests/tests/functional/cp_files/cp_files.c
|
||||
create mode 100755 tests/zfs-tests/tests/functional/cp_files/cp_files_001_pos.ksh
|
||||
create mode 100755 tests/zfs-tests/tests/functional/cp_files/setup.ksh
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d9441a0f..3f4925c3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -238,6 +238,7 @@ AC_CONFIG_FILES([
|
||||
tests/zfs-tests/tests/functional/cli_user/zpool_iostat/Makefile
|
||||
tests/zfs-tests/tests/functional/cli_user/zpool_list/Makefile
|
||||
tests/zfs-tests/tests/functional/compression/Makefile
|
||||
+ tests/zfs-tests/tests/functional/cp_files/Makefile
|
||||
tests/zfs-tests/tests/functional/ctime/Makefile
|
||||
tests/zfs-tests/tests/functional/delegate/Makefile
|
||||
tests/zfs-tests/tests/functional/devices/Makefile
|
||||
diff --git a/include/sys/zap_leaf.h b/include/sys/zap_leaf.h
|
||||
index e784c596..a3da1036 100644
|
||||
--- a/include/sys/zap_leaf.h
|
||||
+++ b/include/sys/zap_leaf.h
|
||||
@@ -46,10 +46,15 @@ struct zap_stats;
|
||||
* block size (1<<l->l_bs) - hash entry size (2) * number of hash
|
||||
* entries - header space (2*chunksize)
|
||||
*/
|
||||
-#define ZAP_LEAF_NUMCHUNKS(l) \
|
||||
- (((1<<(l)->l_bs) - 2*ZAP_LEAF_HASH_NUMENTRIES(l)) / \
|
||||
+#define ZAP_LEAF_NUMCHUNKS_BS(bs) \
|
||||
+ (((1<<(bs)) - 2*ZAP_LEAF_HASH_NUMENTRIES_BS(bs)) / \
|
||||
ZAP_LEAF_CHUNKSIZE - 2)
|
||||
|
||||
+#define ZAP_LEAF_NUMCHUNKS(l) (ZAP_LEAF_NUMCHUNKS_BS(((l)->l_bs)))
|
||||
+
|
||||
+#define ZAP_LEAF_NUMCHUNKS_DEF \
|
||||
+ (ZAP_LEAF_NUMCHUNKS_BS(fzap_default_block_shift))
|
||||
+
|
||||
/*
|
||||
* The amount of space within the chunk available for the array is:
|
||||
* chunk size - space for type (1) - space for next pointer (2)
|
||||
@@ -74,8 +79,10 @@ struct zap_stats;
|
||||
* which is less than block size / CHUNKSIZE (24) / minimum number of
|
||||
* chunks per entry (3).
|
||||
*/
|
||||
-#define ZAP_LEAF_HASH_SHIFT(l) ((l)->l_bs - 5)
|
||||
-#define ZAP_LEAF_HASH_NUMENTRIES(l) (1 << ZAP_LEAF_HASH_SHIFT(l))
|
||||
+#define ZAP_LEAF_HASH_SHIFT_BS(bs) ((bs) - 5)
|
||||
+#define ZAP_LEAF_HASH_NUMENTRIES_BS(bs) (1 << ZAP_LEAF_HASH_SHIFT_BS(bs))
|
||||
+#define ZAP_LEAF_HASH_SHIFT(l) (ZAP_LEAF_HASH_SHIFT_BS(((l)->l_bs)))
|
||||
+#define ZAP_LEAF_HASH_NUMENTRIES(l) (ZAP_LEAF_HASH_NUMENTRIES_BS(((l)->l_bs)))
|
||||
|
||||
/*
|
||||
* The chunks start immediately after the hash table. The end of the
|
||||
diff --git a/module/zfs/zap.c b/module/zfs/zap.c
|
||||
index ee9962bf..47b4c1ab 100644
|
||||
--- a/module/zfs/zap.c
|
||||
+++ b/module/zfs/zap.c
|
||||
@@ -853,8 +853,16 @@ retry:
|
||||
} else if (err == EAGAIN) {
|
||||
err = zap_expand_leaf(zn, l, tag, tx, &l);
|
||||
zap = zn->zn_zap; /* zap_expand_leaf() may change zap */
|
||||
- if (err == 0)
|
||||
+ if (err == 0) {
|
||||
goto retry;
|
||||
+ } else if (err == ENOSPC) {
|
||||
+ /*
|
||||
+ * If we failed to expand the leaf, then bailout
|
||||
+ * as there is no point trying
|
||||
+ * zap_put_leaf_maybe_grow_ptrtbl().
|
||||
+ */
|
||||
+ return (err);
|
||||
+ }
|
||||
}
|
||||
|
||||
out:
|
||||
diff --git a/module/zfs/zap_leaf.c b/module/zfs/zap_leaf.c
|
||||
index c342695c..526e4660 100644
|
||||
--- a/module/zfs/zap_leaf.c
|
||||
+++ b/module/zfs/zap_leaf.c
|
||||
@@ -53,7 +53,7 @@ static uint16_t *zap_leaf_rehash_entry(zap_leaf_t *l, uint16_t entry);
|
||||
((h) >> \
|
||||
(64 - ZAP_LEAF_HASH_SHIFT(l) - zap_leaf_phys(l)->l_hdr.lh_prefix_len)))
|
||||
|
||||
-#define LEAF_HASH_ENTPTR(l, h) (&zap_leaf_phys(l)->l_hash[LEAF_HASH(l, h)])
|
||||
+#define LEAF_HASH_ENTPTR(l, h) (&zap_leaf_phys(l)->l_hash[LEAF_HASH(l, h)])
|
||||
|
||||
extern inline zap_leaf_phys_t *zap_leaf_phys(zap_leaf_t *l);
|
||||
|
||||
diff --git a/module/zfs/zap_micro.c b/module/zfs/zap_micro.c
|
||||
index 3ebf995c..60e193ef 100644
|
||||
--- a/module/zfs/zap_micro.c
|
||||
+++ b/module/zfs/zap_micro.c
|
||||
@@ -363,6 +363,41 @@ mze_find_unused_cd(zap_t *zap, uint64_t hash)
|
||||
return (cd);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Each mzap entry requires at max : 4 chunks
|
||||
+ * 3 chunks for names + 1 chunk for value.
|
||||
+ */
|
||||
+#define MZAP_ENT_CHUNKS (1 + ZAP_LEAF_ARRAY_NCHUNKS(MZAP_NAME_LEN) + \
|
||||
+ ZAP_LEAF_ARRAY_NCHUNKS(sizeof (uint64_t)))
|
||||
+
|
||||
+/*
|
||||
+ * Check if the current entry keeps the colliding entries under the fatzap leaf
|
||||
+ * size.
|
||||
+ */
|
||||
+static boolean_t
|
||||
+mze_canfit_fzap_leaf(zap_name_t *zn, uint64_t hash)
|
||||
+{
|
||||
+ zap_t *zap = zn->zn_zap;
|
||||
+ mzap_ent_t mze_tofind;
|
||||
+ mzap_ent_t *mze;
|
||||
+ avl_index_t idx;
|
||||
+ avl_tree_t *avl = &zap->zap_m.zap_avl;
|
||||
+ uint32_t mzap_ents = 0;
|
||||
+
|
||||
+ mze_tofind.mze_hash = hash;
|
||||
+ mze_tofind.mze_cd = 0;
|
||||
+
|
||||
+ for (mze = avl_find(avl, &mze_tofind, &idx);
|
||||
+ mze && mze->mze_hash == hash; mze = AVL_NEXT(avl, mze)) {
|
||||
+ mzap_ents++;
|
||||
+ }
|
||||
+
|
||||
+ /* Include the new entry being added */
|
||||
+ mzap_ents++;
|
||||
+
|
||||
+ return (ZAP_LEAF_NUMCHUNKS_DEF > (mzap_ents * MZAP_ENT_CHUNKS));
|
||||
+}
|
||||
+
|
||||
static void
|
||||
mze_remove(zap_t *zap, mzap_ent_t *mze)
|
||||
{
|
||||
@@ -639,16 +674,15 @@ mzap_upgrade(zap_t **zapp, void *tag, dmu_tx_t *tx, zap_flags_t flags)
|
||||
dprintf("adding %s=%llu\n",
|
||||
mze->mze_name, mze->mze_value);
|
||||
zn = zap_name_alloc(zap, mze->mze_name, 0);
|
||||
- err = fzap_add_cd(zn, 8, 1, &mze->mze_value, mze->mze_cd,
|
||||
- tag, tx);
|
||||
+ /* If we fail here, we would end up losing entries */
|
||||
+ VERIFY0(fzap_add_cd(zn, 8, 1, &mze->mze_value, mze->mze_cd,
|
||||
+ tag, tx));
|
||||
zap = zn->zn_zap; /* fzap_add_cd() may change zap */
|
||||
zap_name_free(zn);
|
||||
- if (err)
|
||||
- break;
|
||||
}
|
||||
vmem_free(mzp, sz);
|
||||
*zapp = zap;
|
||||
- return (err);
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1191,7 +1225,8 @@ zap_add_impl(zap_t *zap, const char *key,
|
||||
err = fzap_add(zn, integer_size, num_integers, val, tag, tx);
|
||||
zap = zn->zn_zap; /* fzap_add() may change zap */
|
||||
} else if (integer_size != 8 || num_integers != 1 ||
|
||||
- strlen(key) >= MZAP_NAME_LEN) {
|
||||
+ strlen(key) >= MZAP_NAME_LEN ||
|
||||
+ !mze_canfit_fzap_leaf(zn, zn->zn_hash)) {
|
||||
err = mzap_upgrade(&zn->zn_zap, tag, tx, 0);
|
||||
if (err == 0) {
|
||||
err = fzap_add(zn, integer_size, num_integers, val,
|
||||
diff --git a/module/zfs/zfs_dir.c b/module/zfs/zfs_dir.c
|
||||
index 9a8bbccd..6398a1d1 100644
|
||||
--- a/module/zfs/zfs_dir.c
|
||||
+++ b/module/zfs/zfs_dir.c
|
||||
@@ -742,7 +742,11 @@ zfs_dirent(znode_t *zp, uint64_t mode)
|
||||
}
|
||||
|
||||
/*
|
||||
- * Link zp into dl. Can only fail if zp has been unlinked.
|
||||
+ * Link zp into dl. Can fail in the following cases :
|
||||
+ * - if zp has been unlinked.
|
||||
+ * - if the number of entries with the same hash (aka. colliding entries)
|
||||
+ * exceed the capacity of a leaf-block of fatzap and splitting of the
|
||||
+ * leaf-block does not help.
|
||||
*/
|
||||
int
|
||||
zfs_link_create(zfs_dirlock_t *dl, znode_t *zp, dmu_tx_t *tx, int flag)
|
||||
@@ -776,6 +780,24 @@ zfs_link_create(zfs_dirlock_t *dl, znode_t *zp, dmu_tx_t *tx, int flag)
|
||||
NULL, &links, sizeof (links));
|
||||
}
|
||||
}
|
||||
+
|
||||
+ value = zfs_dirent(zp, zp->z_mode);
|
||||
+ error = zap_add(ZTOZSB(zp)->z_os, dzp->z_id, dl->dl_name, 8, 1,
|
||||
+ &value, tx);
|
||||
+
|
||||
+ /*
|
||||
+ * zap_add could fail to add the entry if it exceeds the capacity of the
|
||||
+ * leaf-block and zap_leaf_split() failed to help.
|
||||
+ * The caller of this routine is responsible for failing the transaction
|
||||
+ * which will rollback the SA updates done above.
|
||||
+ */
|
||||
+ if (error != 0) {
|
||||
+ if (!(flag & ZRENAMING) && !(flag & ZNEW))
|
||||
+ drop_nlink(ZTOI(zp));
|
||||
+ mutex_exit(&zp->z_lock);
|
||||
+ return (error);
|
||||
+ }
|
||||
+
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_PARENT(zfsvfs), NULL,
|
||||
&dzp->z_id, sizeof (dzp->z_id));
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_FLAGS(zfsvfs), NULL,
|
||||
@@ -813,11 +835,6 @@ zfs_link_create(zfs_dirlock_t *dl, znode_t *zp, dmu_tx_t *tx, int flag)
|
||||
ASSERT(error == 0);
|
||||
mutex_exit(&dzp->z_lock);
|
||||
|
||||
- value = zfs_dirent(zp, zp->z_mode);
|
||||
- error = zap_add(ZTOZSB(zp)->z_os, dzp->z_id, dl->dl_name,
|
||||
- 8, 1, &value, tx);
|
||||
- ASSERT(error == 0);
|
||||
-
|
||||
return (0);
|
||||
}
|
||||
|
||||
diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
|
||||
index 4805f897..5a2e55eb 100644
|
||||
--- a/module/zfs/zfs_vnops.c
|
||||
+++ b/module/zfs/zfs_vnops.c
|
||||
@@ -1427,6 +1427,7 @@ top:
|
||||
dmu_tx_hold_write(tx, DMU_NEW_OBJECT,
|
||||
0, acl_ids.z_aclp->z_acl_bytes);
|
||||
}
|
||||
+
|
||||
error = dmu_tx_assign(tx,
|
||||
(waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT);
|
||||
if (error) {
|
||||
@@ -1444,10 +1445,22 @@ top:
|
||||
}
|
||||
zfs_mknode(dzp, vap, tx, cr, 0, &zp, &acl_ids);
|
||||
|
||||
+ error = zfs_link_create(dl, zp, tx, ZNEW);
|
||||
+ if (error != 0) {
|
||||
+ /*
|
||||
+ * Since, we failed to add the directory entry for it,
|
||||
+ * delete the newly created dnode.
|
||||
+ */
|
||||
+ zfs_znode_delete(zp, tx);
|
||||
+ remove_inode_hash(ZTOI(zp));
|
||||
+ zfs_acl_ids_free(&acl_ids);
|
||||
+ dmu_tx_commit(tx);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
if (fuid_dirtied)
|
||||
zfs_fuid_sync(zfsvfs, tx);
|
||||
|
||||
- (void) zfs_link_create(dl, zp, tx, ZNEW);
|
||||
txtype = zfs_log_create_txtype(Z_FILE, vsecp, vap);
|
||||
if (flag & FIGNORECASE)
|
||||
txtype |= TX_CI;
|
||||
@@ -2038,13 +2051,18 @@ top:
|
||||
*/
|
||||
zfs_mknode(dzp, vap, tx, cr, 0, &zp, &acl_ids);
|
||||
|
||||
- if (fuid_dirtied)
|
||||
- zfs_fuid_sync(zfsvfs, tx);
|
||||
-
|
||||
/*
|
||||
* Now put new name in parent dir.
|
||||
*/
|
||||
- (void) zfs_link_create(dl, zp, tx, ZNEW);
|
||||
+ error = zfs_link_create(dl, zp, tx, ZNEW);
|
||||
+ if (error != 0) {
|
||||
+ zfs_znode_delete(zp, tx);
|
||||
+ remove_inode_hash(ZTOI(zp));
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (fuid_dirtied)
|
||||
+ zfs_fuid_sync(zfsvfs, tx);
|
||||
|
||||
*ipp = ZTOI(zp);
|
||||
|
||||
@@ -2054,6 +2072,7 @@ top:
|
||||
zfs_log_create(zilog, tx, txtype, dzp, zp, dirname, vsecp,
|
||||
acl_ids.z_fuidp, vap);
|
||||
|
||||
+out:
|
||||
zfs_acl_ids_free(&acl_ids);
|
||||
|
||||
dmu_tx_commit(tx);
|
||||
@@ -2063,10 +2082,14 @@ top:
|
||||
if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
|
||||
zil_commit(zilog, 0);
|
||||
|
||||
- zfs_inode_update(dzp);
|
||||
- zfs_inode_update(zp);
|
||||
+ if (error != 0) {
|
||||
+ iput(ZTOI(zp));
|
||||
+ } else {
|
||||
+ zfs_inode_update(dzp);
|
||||
+ zfs_inode_update(zp);
|
||||
+ }
|
||||
ZFS_EXIT(zfsvfs);
|
||||
- return (0);
|
||||
+ return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3684,6 +3707,13 @@ top:
|
||||
VERIFY3U(zfs_link_destroy(tdl, szp, tx,
|
||||
ZRENAMING, NULL), ==, 0);
|
||||
}
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * If we had removed the existing target, subsequent
|
||||
+ * call to zfs_link_create() to add back the same entry
|
||||
+ * but, the new dnode (szp) should not fail.
|
||||
+ */
|
||||
+ ASSERT(tzp == NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3854,14 +3884,18 @@ top:
|
||||
/*
|
||||
* Insert the new object into the directory.
|
||||
*/
|
||||
- (void) zfs_link_create(dl, zp, tx, ZNEW);
|
||||
-
|
||||
- if (flags & FIGNORECASE)
|
||||
- txtype |= TX_CI;
|
||||
- zfs_log_symlink(zilog, tx, txtype, dzp, zp, name, link);
|
||||
+ error = zfs_link_create(dl, zp, tx, ZNEW);
|
||||
+ if (error != 0) {
|
||||
+ zfs_znode_delete(zp, tx);
|
||||
+ remove_inode_hash(ZTOI(zp));
|
||||
+ } else {
|
||||
+ if (flags & FIGNORECASE)
|
||||
+ txtype |= TX_CI;
|
||||
+ zfs_log_symlink(zilog, tx, txtype, dzp, zp, name, link);
|
||||
|
||||
- zfs_inode_update(dzp);
|
||||
- zfs_inode_update(zp);
|
||||
+ zfs_inode_update(dzp);
|
||||
+ zfs_inode_update(zp);
|
||||
+ }
|
||||
|
||||
zfs_acl_ids_free(&acl_ids);
|
||||
|
||||
@@ -3869,10 +3903,14 @@ top:
|
||||
|
||||
zfs_dirent_unlock(dl);
|
||||
|
||||
- *ipp = ZTOI(zp);
|
||||
+ if (error == 0) {
|
||||
+ *ipp = ZTOI(zp);
|
||||
|
||||
- if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
|
||||
- zil_commit(zilog, 0);
|
||||
+ if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
|
||||
+ zil_commit(zilog, 0);
|
||||
+ } else {
|
||||
+ iput(ZTOI(zp));
|
||||
+ }
|
||||
|
||||
ZFS_EXIT(zfsvfs);
|
||||
return (error);
|
||||
diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run
|
||||
index 272c8c77..379c9f73 100644
|
||||
--- a/tests/runfiles/linux.run
|
||||
+++ b/tests/runfiles/linux.run
|
||||
@@ -55,7 +55,7 @@ tags = ['functional', 'cachefile']
|
||||
# 'mixed_none_lookup', 'mixed_none_lookup_ci', 'mixed_none_delete',
|
||||
# 'mixed_formd_lookup', 'mixed_formd_lookup_ci', 'mixed_formd_delete']
|
||||
[tests/functional/casenorm]
|
||||
-tests = ['case_all_values', 'norm_all_values']
|
||||
+tests = ['case_all_values', 'norm_all_values', 'mixed_create_failure']
|
||||
tags = ['functional', 'casenorm']
|
||||
|
||||
[tests/functional/chattr]
|
||||
@@ -394,6 +394,10 @@ tests = ['compress_001_pos', 'compress_002_pos', 'compress_003_pos',
|
||||
'compress_004_pos']
|
||||
tags = ['functional', 'compression']
|
||||
|
||||
+[tests/functional/cp_files]
|
||||
+tests = ['cp_files_001_pos']
|
||||
+tags = ['functional', 'cp_files']
|
||||
+
|
||||
[tests/functional/ctime]
|
||||
tests = ['ctime_001_pos' ]
|
||||
tags = ['functional', 'ctime']
|
||||
diff --git a/tests/zfs-tests/tests/functional/Makefile.am b/tests/zfs-tests/tests/functional/Makefile.am
|
||||
index cd60324f..ea52205a 100644
|
||||
--- a/tests/zfs-tests/tests/functional/Makefile.am
|
||||
+++ b/tests/zfs-tests/tests/functional/Makefile.am
|
||||
@@ -11,6 +11,7 @@ SUBDIRS = \
|
||||
cli_root \
|
||||
cli_user \
|
||||
compression \
|
||||
+ cp_files \
|
||||
ctime \
|
||||
delegate \
|
||||
devices \
|
||||
diff --git a/tests/zfs-tests/tests/functional/casenorm/Makefile.am b/tests/zfs-tests/tests/functional/casenorm/Makefile.am
|
||||
index 65dd156e..b284a256 100644
|
||||
--- a/tests/zfs-tests/tests/functional/casenorm/Makefile.am
|
||||
+++ b/tests/zfs-tests/tests/functional/casenorm/Makefile.am
|
||||
@@ -7,6 +7,7 @@ dist_pkgdata_SCRIPTS = \
|
||||
insensitive_formd_lookup.ksh \
|
||||
insensitive_none_delete.ksh \
|
||||
insensitive_none_lookup.ksh \
|
||||
+ mixed_create_failure.ksh \
|
||||
mixed_formd_delete.ksh \
|
||||
mixed_formd_lookup_ci.ksh \
|
||||
mixed_formd_lookup.ksh \
|
||||
diff --git a/tests/zfs-tests/tests/functional/casenorm/mixed_create_failure.ksh b/tests/zfs-tests/tests/functional/casenorm/mixed_create_failure.ksh
|
||||
new file mode 100755
|
||||
index 00000000..51b5bb3f
|
||||
--- /dev/null
|
||||
+++ b/tests/zfs-tests/tests/functional/casenorm/mixed_create_failure.ksh
|
||||
@@ -0,0 +1,136 @@
|
||||
+#!/bin/ksh -p
|
||||
+#
|
||||
+#
|
||||
+# This file and its contents are supplied under the terms of the
|
||||
+# Common Development and Distribution License ("CDDL"), version 1.0.
|
||||
+# You may only use this file in accordance with the terms of version
|
||||
+# 1.0 of the CDDL.
|
||||
+#
|
||||
+# A full copy of the text of the CDDL should have accompanied this
|
||||
+# source. A copy of the CDDL is also available via the Internet at
|
||||
+# http://www.illumos.org/license/CDDL.
|
||||
+#
|
||||
+#
|
||||
+# Copyright 2018 Nutanix Inc. All rights reserved.
|
||||
+#
|
||||
+
|
||||
+. $STF_SUITE/tests/functional/casenorm/casenorm.kshlib
|
||||
+
|
||||
+# DESCRIPTION:
|
||||
+# For the filesystem with casesensitivity=mixed, normalization=none,
|
||||
+# when multiple files with the same name (differing only in case) are created,
|
||||
+# the number of files is limited to what can fit in a fatzap leaf-block.
|
||||
+# And beyond that, it fails with ENOSPC.
|
||||
+#
|
||||
+# Ensure that the create/rename operations fail gracefully and not trigger an
|
||||
+# ASSERT.
|
||||
+#
|
||||
+# STRATEGY:
|
||||
+# Repeat the below steps for objects: files, directories, symlinks and hardlinks
|
||||
+# 1. Create objects with same name but varying in case.
|
||||
+# E.g. 'abcdefghijklmnop', 'Abcdefghijklmnop', 'ABcdefghijklmnop' etc.
|
||||
+# The create should fail with ENOSPC.
|
||||
+# 2. Create an object with name 'tmp_obj' and try to rename it to name that we
|
||||
+# failed to add in step 1 above.
|
||||
+# This should fail as well.
|
||||
+
|
||||
+verify_runnable "global"
|
||||
+
|
||||
+function cleanup
|
||||
+{
|
||||
+ destroy_testfs
|
||||
+}
|
||||
+
|
||||
+log_onexit cleanup
|
||||
+log_assert "With mixed mode: ensure create fails with ENOSPC beyond a certain limit"
|
||||
+
|
||||
+create_testfs "-o casesensitivity=mixed -o normalization=none"
|
||||
+
|
||||
+# Different object types
|
||||
+obj_type=('file' 'dir' 'symlink' 'hardlink')
|
||||
+
|
||||
+# Commands to create different object types
|
||||
+typeset -A ops
|
||||
+ops['file']='touch'
|
||||
+ops['dir']='mkdir'
|
||||
+ops['symlink']='ln -s'
|
||||
+ops['hardlink']='ln'
|
||||
+
|
||||
+# This function tests the following for a give object type :
|
||||
+# - Create multiple objects with the same name (varying only in case).
|
||||
+# Ensure that it eventually fails once the leaf-block limit is exceeded.
|
||||
+# - Create another object with a different name. And attempt rename it to the
|
||||
+# name (for which the create had failed in the previous step).
|
||||
+# This should fail as well.
|
||||
+# Args :
|
||||
+# $1 - object type (file/dir/symlink/hardlink)
|
||||
+# $2 - test directory
|
||||
+#
|
||||
+function test_ops
|
||||
+{
|
||||
+ typeset obj_type=$1
|
||||
+ typeset testdir=$2
|
||||
+
|
||||
+ target_obj='target-file'
|
||||
+
|
||||
+ op="${ops[$obj_type]}"
|
||||
+
|
||||
+ log_note "The op : $op"
|
||||
+ log_note "testdir=$testdir obj_type=$obj_type"
|
||||
+
|
||||
+ test_path="$testdir/$obj_type"
|
||||
+ mkdir $test_path
|
||||
+ log_note "Created test dir $test_path"
|
||||
+
|
||||
+ if [[ $obj_type = "symlink" || $obj_type = "hardlink" ]]; then
|
||||
+ touch $test_path/$target_obj
|
||||
+ log_note "Created target: $test_path/$target_obj"
|
||||
+ op="$op $test_path/$target_obj"
|
||||
+ fi
|
||||
+
|
||||
+ log_note "op : $op"
|
||||
+ names='{a,A}{b,B}{c,C}{d,D}{e,E}{f,F}{g,G}{h,H}{i,I}{j,J}{k,K}{l,L}'
|
||||
+ for name in $names; do
|
||||
+ cmd="$op $test_path/$name"
|
||||
+ out=$($cmd 2>&1)
|
||||
+ ret=$?
|
||||
+ log_note "cmd: $cmd ret: $ret out=$out"
|
||||
+ if (($ret != 0)); then
|
||||
+ if [[ $out = *@(No space left on device)* ]]; then
|
||||
+ save_name="$test_path/$name"
|
||||
+ break;
|
||||
+ else
|
||||
+ log_err "$cmd failed with unexpected error : $out"
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ log_note 'Test rename \"sample_name\" rename'
|
||||
+ TMP_OBJ="$test_path/tmp_obj"
|
||||
+ cmd="$op $TMP_OBJ"
|
||||
+ out=$($cmd 2>&1)
|
||||
+ ret=$?
|
||||
+ if (($ret != 0)); then
|
||||
+ log_err "cmd:$cmd failed out:$out"
|
||||
+ fi
|
||||
+
|
||||
+ # Now, try to rename the tmp_obj to the name which we failed to add earlier.
|
||||
+ # This should fail as well.
|
||||
+ out=$(mv $TMP_OBJ $save_name 2>&1)
|
||||
+ ret=$?
|
||||
+ if (($ret != 0)); then
|
||||
+ if [[ $out = *@(No space left on device)* ]]; then
|
||||
+ log_note "$cmd failed as expected : $out"
|
||||
+ else
|
||||
+ log_err "$cmd failed with : $out"
|
||||
+ fi
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+for obj_type in ${obj_type[*]};
|
||||
+do
|
||||
+ log_note "Testing create of $obj_type"
|
||||
+ test_ops $obj_type $TESTDIR
|
||||
+done
|
||||
+
|
||||
+log_pass "Mixed mode FS: Ops on large number of colliding names fail gracefully"
|
||||
diff --git a/tests/zfs-tests/tests/functional/cp_files/.gitignore b/tests/zfs-tests/tests/functional/cp_files/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000..eac05e15
|
||||
--- /dev/null
|
||||
+++ b/tests/zfs-tests/tests/functional/cp_files/.gitignore
|
||||
@@ -0,0 +1 @@
|
||||
+/cp_files
|
||||
diff --git a/tests/zfs-tests/tests/functional/cp_files/Makefile.am b/tests/zfs-tests/tests/functional/cp_files/Makefile.am
|
||||
new file mode 100644
|
||||
index 00000000..06c31f5f
|
||||
--- /dev/null
|
||||
+++ b/tests/zfs-tests/tests/functional/cp_files/Makefile.am
|
||||
@@ -0,0 +1,13 @@
|
||||
+include $(top_srcdir)/config/Rules.am
|
||||
+
|
||||
+pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/cp_files
|
||||
+
|
||||
+dist_pkgdata_SCRIPTS = \
|
||||
+ cp_files_001_pos.ksh \
|
||||
+ cleanup.ksh \
|
||||
+ setup.ksh
|
||||
+
|
||||
+pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/cp_files
|
||||
+
|
||||
+pkgexec_PROGRAMS = cp_files
|
||||
+cp_files_SOURCES= cp_files.c
|
||||
diff --git a/tests/zfs-tests/tests/functional/cp_files/cleanup.ksh b/tests/zfs-tests/tests/functional/cp_files/cleanup.ksh
|
||||
new file mode 100755
|
||||
index 00000000..3166bd6e
|
||||
--- /dev/null
|
||||
+++ b/tests/zfs-tests/tests/functional/cp_files/cleanup.ksh
|
||||
@@ -0,0 +1,34 @@
|
||||
+#!/bin/ksh -p
|
||||
+#
|
||||
+# CDDL HEADER START
|
||||
+#
|
||||
+# The contents of this file are subject to the terms of the
|
||||
+# Common Development and Distribution License (the "License").
|
||||
+# You may not use this file except in compliance with the License.
|
||||
+#
|
||||
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
+# or http://www.opensolaris.org/os/licensing.
|
||||
+# See the License for the specific language governing permissions
|
||||
+# and limitations under the License.
|
||||
+#
|
||||
+# When distributing Covered Code, include this CDDL HEADER in each
|
||||
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
+# If applicable, add the following below this CDDL HEADER, with the
|
||||
+# fields enclosed by brackets "[]" replaced with your own identifying
|
||||
+# information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
+#
|
||||
+# CDDL HEADER END
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
+# Use is subject to license terms.
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# Copyright (c) 2013 by Delphix. All rights reserved.
|
||||
+#
|
||||
+
|
||||
+. $STF_SUITE/include/libtest.shlib
|
||||
+
|
||||
+default_cleanup
|
||||
diff --git a/tests/zfs-tests/tests/functional/cp_files/cp_files.c b/tests/zfs-tests/tests/functional/cp_files/cp_files.c
|
||||
new file mode 100644
|
||||
index 00000000..9af64a11
|
||||
--- /dev/null
|
||||
+++ b/tests/zfs-tests/tests/functional/cp_files/cp_files.c
|
||||
@@ -0,0 +1,58 @@
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <dirent.h>
|
||||
+#include <errno.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+int
|
||||
+main(int argc, char *argv[])
|
||||
+{
|
||||
+ int tfd;
|
||||
+ DIR *sdir;
|
||||
+ struct dirent *dirent;
|
||||
+
|
||||
+ if (argc != 3) {
|
||||
+ fprintf(stderr, "Usage: %s SRC DST\n", argv[0]);
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ sdir = opendir(argv[1]);
|
||||
+ if (sdir == NULL) {
|
||||
+ fprintf(stderr, "Failed to open %s: %s\n",
|
||||
+ argv[1], strerror(errno));
|
||||
+ exit(2);
|
||||
+ }
|
||||
+
|
||||
+ tfd = open(argv[2], O_DIRECTORY);
|
||||
+ if (tfd < 0) {
|
||||
+ fprintf(stderr, "Failed to open %s: %s\n",
|
||||
+ argv[2], strerror(errno));
|
||||
+ closedir(sdir);
|
||||
+ exit(3);
|
||||
+ }
|
||||
+
|
||||
+ while ((dirent = readdir(sdir)) != NULL) {
|
||||
+ if (dirent->d_name[0] == '.' &&
|
||||
+ (dirent->d_name[1] == '.' || dirent->d_name[1] == '\0'))
|
||||
+ continue;
|
||||
+
|
||||
+ int fd = openat(tfd, dirent->d_name, O_CREAT|O_WRONLY, 0666);
|
||||
+ if (fd < 0) {
|
||||
+ fprintf(stderr, "Failed to create %s/%s: %s\n",
|
||||
+ argv[2], dirent->d_name, strerror(errno));
|
||||
+ closedir(sdir);
|
||||
+ close(tfd);
|
||||
+ exit(4);
|
||||
+ }
|
||||
+ close(fd);
|
||||
+ }
|
||||
+
|
||||
+ closedir(sdir);
|
||||
+ close(tfd);
|
||||
+
|
||||
+ return (0);
|
||||
+}
|
||||
diff --git a/tests/zfs-tests/tests/functional/cp_files/cp_files_001_pos.ksh b/tests/zfs-tests/tests/functional/cp_files/cp_files_001_pos.ksh
|
||||
new file mode 100755
|
||||
index 00000000..3e138cfc
|
||||
--- /dev/null
|
||||
+++ b/tests/zfs-tests/tests/functional/cp_files/cp_files_001_pos.ksh
|
||||
@@ -0,0 +1,74 @@
|
||||
+#! /bin/ksh -p
|
||||
+#
|
||||
+# CDDL HEADER START
|
||||
+#
|
||||
+# The contents of this file are subject to the terms of the
|
||||
+# Common Development and Distribution License (the "License").
|
||||
+# You may not use this file except in compliance with the License.
|
||||
+#
|
||||
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
+# or http://www.opensolaris.org/os/licensing.
|
||||
+# See the License for the specific language governing permissions
|
||||
+# and limitations under the License.
|
||||
+#
|
||||
+# When distributing Covered Code, include this CDDL HEADER in each
|
||||
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
+# If applicable, add the following below this CDDL HEADER, with the
|
||||
+# fields enclosed by brackets "[]" replaced with your own identifying
|
||||
+# information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
+#
|
||||
+# CDDL HEADER END
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# Copyright (c) 2018 by Nutanix. All rights reserved.
|
||||
+#
|
||||
+
|
||||
+. $STF_SUITE/include/libtest.shlib
|
||||
+
|
||||
+#
|
||||
+# DESCRIPTION:
|
||||
+# Copy a large number of files between 2 directories
|
||||
+# within a zfs filesystem works without errors.
|
||||
+# This make sure zap upgrading and expanding works.
|
||||
+#
|
||||
+# STRATEGY:
|
||||
+#
|
||||
+# 1. Create NR_FILES files in directory src
|
||||
+# 2. Check the number of files is correct
|
||||
+# 3. Copy files from src to dst in readdir order
|
||||
+# 4. Check the number of files is correct
|
||||
+#
|
||||
+
|
||||
+verify_runnable "global"
|
||||
+
|
||||
+function cleanup
|
||||
+{
|
||||
+ rm -rf $TESTDIR/src $TESTDIR/dst
|
||||
+}
|
||||
+
|
||||
+log_assert "Copy a large number of files between 2 directories" \
|
||||
+ "within a zfs filesystem works without errors"
|
||||
+
|
||||
+log_onexit cleanup
|
||||
+
|
||||
+NR_FILES=60000
|
||||
+BATCH=1000
|
||||
+
|
||||
+log_must mkdir $TESTDIR/src
|
||||
+log_must mkdir $TESTDIR/dst
|
||||
+
|
||||
+WD=$(pwd)
|
||||
+cd $TESTDIR/src
|
||||
+# create NR_FILES in BATCH at a time to prevent overflowing argument buffer
|
||||
+for i in $(seq $(($NR_FILES/$BATCH))); do touch $(seq $((($i-1)*$BATCH+1)) $(($i*$BATCH))); done
|
||||
+cd $WD
|
||||
+
|
||||
+log_must test $NR_FILES -eq $(ls -U $TESTDIR/src | wc -l)
|
||||
+
|
||||
+# copy files from src to dst, use cp_files to make sure we copy in readdir order
|
||||
+log_must $STF_SUITE/tests/functional/cp_files/cp_files $TESTDIR/src $TESTDIR/dst
|
||||
+
|
||||
+log_must test $NR_FILES -eq $(ls -U $TESTDIR/dst | wc -l)
|
||||
+
|
||||
+log_pass
|
||||
diff --git a/tests/zfs-tests/tests/functional/cp_files/setup.ksh b/tests/zfs-tests/tests/functional/cp_files/setup.ksh
|
||||
new file mode 100755
|
||||
index 00000000..fc5cec30
|
||||
--- /dev/null
|
||||
+++ b/tests/zfs-tests/tests/functional/cp_files/setup.ksh
|
||||
@@ -0,0 +1,35 @@
|
||||
+#!/bin/ksh -p
|
||||
+#
|
||||
+# CDDL HEADER START
|
||||
+#
|
||||
+# The contents of this file are subject to the terms of the
|
||||
+# Common Development and Distribution License (the "License").
|
||||
+# You may not use this file except in compliance with the License.
|
||||
+#
|
||||
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
+# or http://www.opensolaris.org/os/licensing.
|
||||
+# See the License for the specific language governing permissions
|
||||
+# and limitations under the License.
|
||||
+#
|
||||
+# When distributing Covered Code, include this CDDL HEADER in each
|
||||
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
+# If applicable, add the following below this CDDL HEADER, with the
|
||||
+# fields enclosed by brackets "[]" replaced with your own identifying
|
||||
+# information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
+#
|
||||
+# CDDL HEADER END
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
+# Use is subject to license terms.
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# Copyright (c) 2013 by Delphix. All rights reserved.
|
||||
+#
|
||||
+
|
||||
+. $STF_SUITE/include/libtest.shlib
|
||||
+
|
||||
+DISK=${DISKS%% *}
|
||||
+default_setup $DISK
|
||||
@@ -1,155 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Tue, 5 Sep 2017 13:41:32 -0700
|
||||
Subject: [PATCH] Trim new line from zfs_vdev_scheduler
|
||||
|
||||
Add a helper function to trim the tailing new line. While we're
|
||||
here use this new hook to immediately apply the new scheduler.
|
||||
|
||||
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #3356
|
||||
Closes #6573
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
module/zfs/vdev_disk.c | 71 +++++++++++++++++++++++++++++++++++++-------------
|
||||
1 file changed, 53 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
|
||||
index 5ae50a31..d6212835 100644
|
||||
--- a/module/zfs/vdev_disk.c
|
||||
+++ b/module/zfs/vdev_disk.c
|
||||
@@ -27,13 +27,14 @@
|
||||
*/
|
||||
|
||||
#include <sys/zfs_context.h>
|
||||
-#include <sys/spa.h>
|
||||
+#include <sys/spa_impl.h>
|
||||
#include <sys/vdev_disk.h>
|
||||
#include <sys/vdev_impl.h>
|
||||
#include <sys/abd.h>
|
||||
#include <sys/fs/zfs.h>
|
||||
#include <sys/zio.h>
|
||||
#include <sys/sunldi.h>
|
||||
+#include <linux/mod_compat.h>
|
||||
|
||||
char *zfs_vdev_scheduler = VDEV_SCHEDULER;
|
||||
static void *zfs_vdev_holder = VDEV_HOLDER;
|
||||
@@ -113,15 +114,23 @@ vdev_disk_error(zio_t *zio)
|
||||
* physical device. This yields the largest possible requests for
|
||||
* the device with the lowest total overhead.
|
||||
*/
|
||||
-static int
|
||||
+static void
|
||||
vdev_elevator_switch(vdev_t *v, char *elevator)
|
||||
{
|
||||
vdev_disk_t *vd = v->vdev_tsd;
|
||||
- struct block_device *bdev = vd->vd_bdev;
|
||||
- struct request_queue *q = bdev_get_queue(bdev);
|
||||
- char *device = bdev->bd_disk->disk_name;
|
||||
+ struct request_queue *q;
|
||||
+ char *device;
|
||||
int error;
|
||||
|
||||
+ for (int c = 0; c < v->vdev_children; c++)
|
||||
+ vdev_elevator_switch(v->vdev_child[c], elevator);
|
||||
+
|
||||
+ if (!v->vdev_ops->vdev_op_leaf || vd->vd_bdev == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ q = bdev_get_queue(vd->vd_bdev);
|
||||
+ device = vd->vd_bdev->bd_disk->disk_name;
|
||||
+
|
||||
/*
|
||||
* Skip devices which are not whole disks (partitions).
|
||||
* Device-mapper devices are excepted since they may be whole
|
||||
@@ -131,15 +140,15 @@ vdev_elevator_switch(vdev_t *v, char *elevator)
|
||||
* "Skip devices without schedulers" check below will fail.
|
||||
*/
|
||||
if (!v->vdev_wholedisk && strncmp(device, "dm-", 3) != 0)
|
||||
- return (0);
|
||||
+ return;
|
||||
|
||||
/* Skip devices without schedulers (loop, ram, dm, etc) */
|
||||
if (!q->elevator || !blk_queue_stackable(q))
|
||||
- return (0);
|
||||
+ return;
|
||||
|
||||
/* Leave existing scheduler when set to "none" */
|
||||
if ((strncmp(elevator, "none", 4) == 0) && (strlen(elevator) == 4))
|
||||
- return (0);
|
||||
+ return;
|
||||
|
||||
#ifdef HAVE_ELEVATOR_CHANGE
|
||||
error = elevator_change(q, elevator);
|
||||
@@ -156,20 +165,16 @@ vdev_elevator_switch(vdev_t *v, char *elevator)
|
||||
" 2>/dev/null; " \
|
||||
"echo %s"
|
||||
|
||||
- {
|
||||
- char *argv[] = { "/bin/sh", "-c", NULL, NULL };
|
||||
- char *envp[] = { NULL };
|
||||
+ char *argv[] = { "/bin/sh", "-c", NULL, NULL };
|
||||
+ char *envp[] = { NULL };
|
||||
|
||||
- argv[2] = kmem_asprintf(SET_SCHEDULER_CMD, device, elevator);
|
||||
- error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
|
||||
- strfree(argv[2]);
|
||||
- }
|
||||
+ argv[2] = kmem_asprintf(SET_SCHEDULER_CMD, device, elevator);
|
||||
+ error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
|
||||
+ strfree(argv[2]);
|
||||
#endif /* HAVE_ELEVATOR_CHANGE */
|
||||
if (error)
|
||||
printk("ZFS: Unable to set \"%s\" scheduler for %s (%s): %d\n",
|
||||
elevator, v->vdev_path, device, error);
|
||||
-
|
||||
- return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -798,6 +803,35 @@ vdev_disk_rele(vdev_t *vd)
|
||||
/* XXX: Implement me as a vnode rele for the device */
|
||||
}
|
||||
|
||||
+static int
|
||||
+param_set_vdev_scheduler(const char *val, zfs_kernel_param_t *kp)
|
||||
+{
|
||||
+ spa_t *spa = NULL;
|
||||
+ char *p;
|
||||
+
|
||||
+ if (val == NULL)
|
||||
+ return (SET_ERROR(-EINVAL));
|
||||
+
|
||||
+ if ((p = strchr(val, '\n')) != NULL)
|
||||
+ *p = '\0';
|
||||
+
|
||||
+ mutex_enter(&spa_namespace_lock);
|
||||
+ while ((spa = spa_next(spa)) != NULL) {
|
||||
+ if (spa_state(spa) != POOL_STATE_ACTIVE ||
|
||||
+ !spa_writeable(spa) || spa_suspended(spa))
|
||||
+ continue;
|
||||
+
|
||||
+ spa_open_ref(spa, FTAG);
|
||||
+ mutex_exit(&spa_namespace_lock);
|
||||
+ vdev_elevator_switch(spa->spa_root_vdev, (char *)val);
|
||||
+ mutex_enter(&spa_namespace_lock);
|
||||
+ spa_close(spa, FTAG);
|
||||
+ }
|
||||
+ mutex_exit(&spa_namespace_lock);
|
||||
+
|
||||
+ return (param_set_charp(val, kp));
|
||||
+}
|
||||
+
|
||||
vdev_ops_t vdev_disk_ops = {
|
||||
vdev_disk_open,
|
||||
vdev_disk_close,
|
||||
@@ -812,5 +846,6 @@ vdev_ops_t vdev_disk_ops = {
|
||||
B_TRUE /* leaf vdev */
|
||||
};
|
||||
|
||||
-module_param(zfs_vdev_scheduler, charp, 0644);
|
||||
+module_param_call(zfs_vdev_scheduler, param_set_vdev_scheduler,
|
||||
+ param_get_charp, &zfs_vdev_scheduler, 0644);
|
||||
MODULE_PARM_DESC(zfs_vdev_scheduler, "I/O scheduler");
|
||||
@@ -1,84 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Olaf Faaland <faaland1@llnl.gov>
|
||||
Date: Fri, 11 May 2018 12:46:07 -0700
|
||||
Subject: [PATCH] module param callbacks check for initialized spa
|
||||
|
||||
Callbacks provided for module parameters are executed both
|
||||
after the module is loaded, when a user alters it via sysfs, e.g
|
||||
echo bar > /sys/modules/zfs/parameters/foo
|
||||
|
||||
as well as when the module is loaded with an argument, e.g.
|
||||
modprobe zfs foo=bar
|
||||
|
||||
In the latter case, the init functions likely have not run yet,
|
||||
including spa_init() which initializes the namespace lock so it is safe
|
||||
to use.
|
||||
|
||||
Instead of immediately taking the namespace lock and attemping to
|
||||
iterate over initialized spa structures, check whether spa_mode_global
|
||||
is nonzero. This is set by spa_init() after it has initialized the
|
||||
namespace lock.
|
||||
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Reviewed-by: Tim Chase <tim@chase2k.com>
|
||||
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
|
||||
Closes #7496
|
||||
Closes #7521
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
module/zfs/mmp.c | 3 ++-
|
||||
module/zfs/vdev_disk.c | 24 +++++++++++++-----------
|
||||
2 files changed, 15 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/module/zfs/mmp.c b/module/zfs/mmp.c
|
||||
index 3b74a6b6..7523310c 100644
|
||||
--- a/module/zfs/mmp.c
|
||||
+++ b/module/zfs/mmp.c
|
||||
@@ -607,7 +607,8 @@ param_set_multihost_interval(const char *val, zfs_kernel_param_t *kp)
|
||||
if (ret < 0)
|
||||
return (ret);
|
||||
|
||||
- mmp_signal_all_threads();
|
||||
+ if (spa_mode_global != 0)
|
||||
+ mmp_signal_all_threads();
|
||||
|
||||
return (ret);
|
||||
}
|
||||
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
|
||||
index d6212835..6761e755 100644
|
||||
--- a/module/zfs/vdev_disk.c
|
||||
+++ b/module/zfs/vdev_disk.c
|
||||
@@ -815,19 +815,21 @@ param_set_vdev_scheduler(const char *val, zfs_kernel_param_t *kp)
|
||||
if ((p = strchr(val, '\n')) != NULL)
|
||||
*p = '\0';
|
||||
|
||||
- mutex_enter(&spa_namespace_lock);
|
||||
- while ((spa = spa_next(spa)) != NULL) {
|
||||
- if (spa_state(spa) != POOL_STATE_ACTIVE ||
|
||||
- !spa_writeable(spa) || spa_suspended(spa))
|
||||
- continue;
|
||||
-
|
||||
- spa_open_ref(spa, FTAG);
|
||||
- mutex_exit(&spa_namespace_lock);
|
||||
- vdev_elevator_switch(spa->spa_root_vdev, (char *)val);
|
||||
+ if (spa_mode_global != 0) {
|
||||
mutex_enter(&spa_namespace_lock);
|
||||
- spa_close(spa, FTAG);
|
||||
+ while ((spa = spa_next(spa)) != NULL) {
|
||||
+ if (spa_state(spa) != POOL_STATE_ACTIVE ||
|
||||
+ !spa_writeable(spa) || spa_suspended(spa))
|
||||
+ continue;
|
||||
+
|
||||
+ spa_open_ref(spa, FTAG);
|
||||
+ mutex_exit(&spa_namespace_lock);
|
||||
+ vdev_elevator_switch(spa->spa_root_vdev, (char *)val);
|
||||
+ mutex_enter(&spa_namespace_lock);
|
||||
+ spa_close(spa, FTAG);
|
||||
+ }
|
||||
+ mutex_exit(&spa_namespace_lock);
|
||||
}
|
||||
- mutex_exit(&spa_namespace_lock);
|
||||
|
||||
return (param_set_charp(val, kp));
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Russo <antonio.e.russo@gmail.com>
|
||||
Date: Sat, 26 May 2018 13:56:24 -0400
|
||||
Subject: [PATCH] Support Debian DKMS builds
|
||||
|
||||
scripts/dkms.mkconf calls configure with
|
||||
`--with-linux=${kernel_source_dir}`, but Debian puts it kernel source at
|
||||
`/lib/modules/<version>/source`. This patch adds the same logic to the
|
||||
DKMS file produced by `scripts/dkms.mkconf` that Debian has shipped in
|
||||
its official ZFS packaging: at DKMS build time, it checks if the system
|
||||
is a Debian system, and adjusts the path accordingly.
|
||||
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Reviewed-by: George Melikov <mail@gmelikov.ru>
|
||||
Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
|
||||
Closes #7358
|
||||
Closes #7540
|
||||
Closes #7554
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
scripts/dkms.mkconf | 17 ++++++++++++++++-
|
||||
1 file changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/dkms.mkconf b/scripts/dkms.mkconf
|
||||
index 880510ab..88c28938 100755
|
||||
--- a/scripts/dkms.mkconf
|
||||
+++ b/scripts/dkms.mkconf
|
||||
@@ -25,7 +25,22 @@ PACKAGE_CONFIG="${pkgcfg}"
|
||||
PRE_BUILD="configure
|
||||
--prefix=/usr
|
||||
--with-config=kernel
|
||||
- --with-linux=\${kernel_source_dir}
|
||||
+ --with-linux=\$(
|
||||
+ case \`lsb_release -is\` in
|
||||
+ (Debian|Devuan)
|
||||
+ if [[ -e \${kernel_source_dir/%build/source} ]]
|
||||
+ then
|
||||
+ echo \${kernel_source_dir/%build/source}
|
||||
+ else
|
||||
+ # A kpkg exception for Proxmox 2.0
|
||||
+ echo \${kernel_source_dir}
|
||||
+ fi
|
||||
+ ;;
|
||||
+ (*)
|
||||
+ echo \${kernel_source_dir}
|
||||
+ ;;
|
||||
+ esac
|
||||
+ )
|
||||
--with-linux-obj=\${kernel_source_dir}
|
||||
--with-spl=\${source_tree}/spl-\${PACKAGE_VERSION}
|
||||
--with-spl-obj=\${dkms_tree}/spl/\${PACKAGE_VERSION}/\${kernelver}/\${arch}
|
||||
@@ -1,376 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Sara Hartse <sara.hartse@gmail.com>
|
||||
Date: Thu, 31 May 2018 10:36:37 -0700
|
||||
Subject: [PATCH] zpool reopen should detect expanded devices
|
||||
|
||||
Update bdev_capacity to have wholedisk vdevs query the
|
||||
size of the underlying block device (correcting for the size
|
||||
of the efi parition and partition alignment) and therefore detect
|
||||
expanded space.
|
||||
|
||||
Correct vdev_get_stats_ex so that the expandsize is aligned
|
||||
to metaslab size and new space is only reported if it is large
|
||||
enough for a new metaslab.
|
||||
|
||||
Reviewed by: Don Brady <don.brady@delphix.com>
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Reviewed by: George Wilson <george.wilson@delphix.com>
|
||||
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
|
||||
Reviewed by: John Wren Kennedy <jwk404@gmail.com>
|
||||
Signed-off-by: sara hartse <sara.hartse@delphix.com>
|
||||
External-issue: LX-165
|
||||
Closes #7546
|
||||
Issue #7582
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
include/sys/vdev_disk.h | 12 +++++
|
||||
lib/libefi/rdwr_efi.c | 20 +++++++-
|
||||
lib/libzfs/libzfs_pool.c | 14 +-----
|
||||
module/zfs/vdev.c | 3 +-
|
||||
module/zfs/vdev_disk.c | 46 +++++++++++++-----
|
||||
.../cli_root/zpool_expand/zpool_expand_002_pos.ksh | 54 +++++++++++++++-------
|
||||
6 files changed, 107 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/include/sys/vdev_disk.h b/include/sys/vdev_disk.h
|
||||
index 15570b10..b8a32b31 100644
|
||||
--- a/include/sys/vdev_disk.h
|
||||
+++ b/include/sys/vdev_disk.h
|
||||
@@ -23,11 +23,23 @@
|
||||
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
|
||||
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
|
||||
* LLNL-CODE-403049.
|
||||
+ * Copyright (c) 2018 by Delphix. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_VDEV_DISK_H
|
||||
#define _SYS_VDEV_DISK_H
|
||||
|
||||
+/*
|
||||
+ * Don't start the slice at the default block of 34; many storage
|
||||
+ * devices will use a stripe width of 128k, other vendors prefer a 1m
|
||||
+ * alignment. It is best to play it safe and ensure a 1m alignment
|
||||
+ * given 512B blocks. When the block size is larger by a power of 2
|
||||
+ * we will still be 1m aligned. Some devices are sensitive to the
|
||||
+ * partition ending alignment as well.
|
||||
+ */
|
||||
+#define NEW_START_BLOCK 2048
|
||||
+#define PARTITION_END_ALIGNMENT 2048
|
||||
+
|
||||
#ifdef _KERNEL
|
||||
#include <sys/vdev.h>
|
||||
|
||||
diff --git a/lib/libefi/rdwr_efi.c b/lib/libefi/rdwr_efi.c
|
||||
index 7935047e..19cb17e5 100644
|
||||
--- a/lib/libefi/rdwr_efi.c
|
||||
+++ b/lib/libefi/rdwr_efi.c
|
||||
@@ -22,6 +22,7 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012 Nexenta Systems, Inc. All rights reserved.
|
||||
+ * Copyright (c) 2018 by Delphix. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -1153,7 +1154,7 @@ efi_use_whole_disk(int fd)
|
||||
|
||||
/*
|
||||
* Find the last physically non-zero partition.
|
||||
- * This is the reserved partition.
|
||||
+ * This should be the reserved partition.
|
||||
*/
|
||||
for (i = 0; i < efi_label->efi_nparts; i ++) {
|
||||
if (resv_start < efi_label->efi_parts[i].p_start) {
|
||||
@@ -1163,6 +1164,23 @@ efi_use_whole_disk(int fd)
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Verify that we've found the reserved partition by checking
|
||||
+ * that it looks the way it did when we created it in zpool_label_disk.
|
||||
+ * If we've found the incorrect partition, then we know that this
|
||||
+ * device was reformatted and no longer is soley used by ZFS.
|
||||
+ */
|
||||
+ if ((efi_label->efi_parts[resv_index].p_size != EFI_MIN_RESV_SIZE) ||
|
||||
+ (efi_label->efi_parts[resv_index].p_tag != V_RESERVED) ||
|
||||
+ (resv_index != 8)) {
|
||||
+ if (efi_debug) {
|
||||
+ (void) fprintf(stderr,
|
||||
+ "efi_use_whole_disk: wholedisk not available\n");
|
||||
+ }
|
||||
+ efi_free(efi_label);
|
||||
+ return (VT_ENOSPC);
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
* Find the last physically non-zero partition before that.
|
||||
* This is the data partition.
|
||||
*/
|
||||
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c
|
||||
index e00d5f51..53bc5034 100644
|
||||
--- a/lib/libzfs/libzfs_pool.c
|
||||
+++ b/lib/libzfs/libzfs_pool.c
|
||||
@@ -22,7 +22,7 @@
|
||||
/*
|
||||
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
- * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
|
||||
+ * Copyright (c) 2011, 2018 by Delphix. All rights reserved.
|
||||
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>
|
||||
* Copyright (c) 2017 Datto Inc.
|
||||
*/
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <sys/efi_partition.h>
|
||||
#include <sys/vtoc.h>
|
||||
#include <sys/zfs_ioctl.h>
|
||||
+#include <sys/vdev_disk.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "zfs_namecheck.h"
|
||||
@@ -913,17 +914,6 @@ zpool_prop_get_feature(zpool_handle_t *zhp, const char *propname, char *buf,
|
||||
}
|
||||
|
||||
/*
|
||||
- * Don't start the slice at the default block of 34; many storage
|
||||
- * devices will use a stripe width of 128k, other vendors prefer a 1m
|
||||
- * alignment. It is best to play it safe and ensure a 1m alignment
|
||||
- * given 512B blocks. When the block size is larger by a power of 2
|
||||
- * we will still be 1m aligned. Some devices are sensitive to the
|
||||
- * partition ending alignment as well.
|
||||
- */
|
||||
-#define NEW_START_BLOCK 2048
|
||||
-#define PARTITION_END_ALIGNMENT 2048
|
||||
-
|
||||
-/*
|
||||
* Validate the given pool name, optionally putting an extended error message in
|
||||
* 'buf'.
|
||||
*/
|
||||
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
|
||||
index acac2a97..b643bd35 100644
|
||||
--- a/module/zfs/vdev.c
|
||||
+++ b/module/zfs/vdev.c
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
- * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
|
||||
+ * Copyright (c) 2011, 2018 by Delphix. All rights reserved.
|
||||
* Copyright 2017 Nexenta Systems, Inc.
|
||||
* Copyright (c) 2014 Integros [integros.com]
|
||||
* Copyright 2016 Toomas Soome <tsoome@me.com>
|
||||
@@ -3039,7 +3039,6 @@ vdev_get_stats_ex(vdev_t *vd, vdev_stat_t *vs, vdev_stat_ex_t *vsx)
|
||||
vd->vdev_max_asize - vd->vdev_asize,
|
||||
1ULL << tvd->vdev_ms_shift);
|
||||
}
|
||||
- vs->vs_esize = vd->vdev_max_asize - vd->vdev_asize;
|
||||
if (vd->vdev_aux == NULL && vd == vd->vdev_top &&
|
||||
!vd->vdev_ishole) {
|
||||
vs->vs_fragmentation = vd->vdev_mg->mg_fragmentation;
|
||||
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
|
||||
index 6761e755..6dc0544f 100644
|
||||
--- a/module/zfs/vdev_disk.c
|
||||
+++ b/module/zfs/vdev_disk.c
|
||||
@@ -23,7 +23,7 @@
|
||||
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
|
||||
* Rewritten for Linux by Brian Behlendorf <behlendorf1@llnl.gov>.
|
||||
* LLNL-CODE-403049.
|
||||
- * Copyright (c) 2012, 2015 by Delphix. All rights reserved.
|
||||
+ * Copyright (c) 2012, 2018 by Delphix. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <sys/zfs_context.h>
|
||||
@@ -35,10 +35,14 @@
|
||||
#include <sys/zio.h>
|
||||
#include <sys/sunldi.h>
|
||||
#include <linux/mod_compat.h>
|
||||
+#include <linux/msdos_fs.h>
|
||||
|
||||
char *zfs_vdev_scheduler = VDEV_SCHEDULER;
|
||||
static void *zfs_vdev_holder = VDEV_HOLDER;
|
||||
|
||||
+/* size of the "reserved" partition, in blocks */
|
||||
+#define EFI_MIN_RESV_SIZE (16 * 1024)
|
||||
+
|
||||
/*
|
||||
* Virtual device vector for disks.
|
||||
*/
|
||||
@@ -82,17 +86,39 @@ vdev_bdev_mode(int smode)
|
||||
}
|
||||
#endif /* HAVE_OPEN_BDEV_EXCLUSIVE */
|
||||
|
||||
+/* The capacity (in bytes) of a bdev that is available to be used by a vdev */
|
||||
static uint64_t
|
||||
-bdev_capacity(struct block_device *bdev)
|
||||
+bdev_capacity(struct block_device *bdev, boolean_t wholedisk)
|
||||
{
|
||||
struct hd_struct *part = bdev->bd_part;
|
||||
+ uint64_t sectors = get_capacity(bdev->bd_disk);
|
||||
+ /* If there are no paritions, return the entire device capacity */
|
||||
+ if (part == NULL)
|
||||
+ return (sectors << SECTOR_BITS);
|
||||
|
||||
- /* The partition capacity referenced by the block device */
|
||||
- if (part)
|
||||
- return (part->nr_sects << 9);
|
||||
-
|
||||
- /* Otherwise assume the full device capacity */
|
||||
- return (get_capacity(bdev->bd_disk) << 9);
|
||||
+ /*
|
||||
+ * If there are partitions, decide if we are using a `wholedisk`
|
||||
+ * layout (composed of part1 and part9) or just a single partition.
|
||||
+ */
|
||||
+ if (wholedisk) {
|
||||
+ /* Verify the expected device layout */
|
||||
+ ASSERT3P(bdev, !=, bdev->bd_contains);
|
||||
+ /*
|
||||
+ * Sectors used by the EFI partition (part9) as well as
|
||||
+ * partion alignment.
|
||||
+ */
|
||||
+ uint64_t used = EFI_MIN_RESV_SIZE + NEW_START_BLOCK +
|
||||
+ PARTITION_END_ALIGNMENT;
|
||||
+
|
||||
+ /* Space available to the vdev, i.e. the size of part1 */
|
||||
+ if (sectors <= used)
|
||||
+ return (0);
|
||||
+ uint64_t available = sectors - used;
|
||||
+ return (available << SECTOR_BITS);
|
||||
+ } else {
|
||||
+ /* The partition capacity referenced by the block device */
|
||||
+ return (part->nr_sects << SECTOR_BITS);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -328,9 +354,7 @@ skip_open:
|
||||
v->vdev_nonrot = blk_queue_nonrot(bdev_get_queue(vd->vd_bdev));
|
||||
|
||||
/* Physical volume size in bytes */
|
||||
- *psize = bdev_capacity(vd->vd_bdev);
|
||||
-
|
||||
- /* TODO: report possible expansion size */
|
||||
+ *psize = bdev_capacity(vd->vd_bdev, v->vdev_wholedisk);
|
||||
*max_psize = *psize;
|
||||
|
||||
/* Based on the minimum sector size set the block size */
|
||||
diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_002_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_002_pos.ksh
|
||||
index d578ae60..66b6969d 100755
|
||||
--- a/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_002_pos.ksh
|
||||
+++ b/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_002_pos.ksh
|
||||
@@ -26,7 +26,7 @@
|
||||
#
|
||||
|
||||
#
|
||||
-# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
|
||||
+# Copyright (c) 2012, 2018 by Delphix. All rights reserved.
|
||||
# Copyright (c) 2017 Lawrence Livermore National Security, LLC.
|
||||
#
|
||||
|
||||
@@ -43,8 +43,9 @@
|
||||
# 1) Create 3 files
|
||||
# 2) Create a pool backed by the files
|
||||
# 3) Expand the files' size with truncate
|
||||
-# 4) Use zpool online -e to online the vdevs
|
||||
-# 5) Check that the pool size was expanded
|
||||
+# 4) Use zpool reopen to check the expandsize
|
||||
+# 5) Use zpool online -e to online the vdevs
|
||||
+# 6) Check that the pool size was expanded
|
||||
#
|
||||
|
||||
verify_runnable "global"
|
||||
@@ -64,8 +65,8 @@ log_onexit cleanup
|
||||
|
||||
log_assert "zpool can expand after zpool online -e zvol vdevs on LUN expansion"
|
||||
|
||||
-
|
||||
for type in " " mirror raidz raidz2; do
|
||||
+ # Initialize the file devices and the pool
|
||||
for i in 1 2 3; do
|
||||
log_must truncate -s $org_size ${TEMPFILE}.$i
|
||||
done
|
||||
@@ -80,13 +81,35 @@ for type in " " mirror raidz raidz2; do
|
||||
"$autoexp"
|
||||
fi
|
||||
typeset prev_size=$(get_pool_prop size $TESTPOOL1)
|
||||
- typeset zfs_prev_size=$(zfs get -p avail $TESTPOOL1 | tail -1 | \
|
||||
- awk '{print $3}')
|
||||
+ typeset zfs_prev_size=$(get_prop avail $TESTPOOL1)
|
||||
|
||||
+ # Increase the size of the file devices
|
||||
for i in 1 2 3; do
|
||||
log_must truncate -s $exp_size ${TEMPFILE}.$i
|
||||
done
|
||||
|
||||
+ # Reopen the pool and check that the `expandsize` property is set
|
||||
+ log_must zpool reopen $TESTPOOL1
|
||||
+ typeset zpool_expandsize=$(get_pool_prop expandsize $TESTPOOL1)
|
||||
+
|
||||
+ if [[ $type == "mirror" ]]; then
|
||||
+ typeset expected_zpool_expandsize=$(($exp_size-$org_size))
|
||||
+ else
|
||||
+ typeset expected_zpool_expandsize=$((3*($exp_size-$org_size)))
|
||||
+ fi
|
||||
+
|
||||
+ if [[ "$zpool_expandsize" = "-" ]]; then
|
||||
+ log_fail "pool $TESTPOOL1 did not detect any " \
|
||||
+ "expandsize after reopen"
|
||||
+ fi
|
||||
+
|
||||
+ if [[ $zpool_expandsize -ne $expected_zpool_expandsize ]]; then
|
||||
+ log_fail "pool $TESTPOOL1 did not detect correct " \
|
||||
+ "expandsize after reopen: found $zpool_expandsize," \
|
||||
+ "expected $expected_zpool_expandsize"
|
||||
+ fi
|
||||
+
|
||||
+ # Online the devices to add the new space to the pool
|
||||
for i in 1 2 3; do
|
||||
log_must zpool online -e $TESTPOOL1 ${TEMPFILE}.$i
|
||||
done
|
||||
@@ -96,8 +119,7 @@ for type in " " mirror raidz raidz2; do
|
||||
sync
|
||||
|
||||
typeset expand_size=$(get_pool_prop size $TESTPOOL1)
|
||||
- typeset zfs_expand_size=$(zfs get -p avail $TESTPOOL1 | tail -1 | \
|
||||
- awk '{print $3}')
|
||||
+ typeset zfs_expand_size=$(get_prop avail $TESTPOOL1)
|
||||
log_note "$TESTPOOL1 $type has previous size: $prev_size and " \
|
||||
"expanded size: $expand_size"
|
||||
|
||||
@@ -112,8 +134,8 @@ for type in " " mirror raidz raidz2; do
|
||||
grep "(+${expansion_size}" | wc -l)
|
||||
|
||||
if [[ $size_addition -ne $i ]]; then
|
||||
- log_fail "pool $TESTPOOL1 is not autoexpand " \
|
||||
- "after LUN expansion"
|
||||
+ log_fail "pool $TESTPOOL1 did not expand " \
|
||||
+ "after LUN expansion and zpool online -e"
|
||||
fi
|
||||
elif [[ $type == "mirror" ]]; then
|
||||
typeset expansion_size=$(($exp_size-$org_size))
|
||||
@@ -123,8 +145,8 @@ for type in " " mirror raidz raidz2; do
|
||||
grep "(+${expansion_size})" >/dev/null 2>&1
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
- log_fail "pool $TESTPOOL1 is not autoexpand " \
|
||||
- "after LUN expansion"
|
||||
+ log_fail "pool $TESTPOOL1 did not expand " \
|
||||
+ "after LUN expansion and zpool online -e"
|
||||
fi
|
||||
else
|
||||
typeset expansion_size=$((3*($exp_size-$org_size)))
|
||||
@@ -134,13 +156,13 @@ for type in " " mirror raidz raidz2; do
|
||||
grep "(+${expansion_size})" >/dev/null 2>&1
|
||||
|
||||
if [[ $? -ne 0 ]] ; then
|
||||
- log_fail "pool $TESTPOOL1 is not autoexpand " \
|
||||
- "after LUN expansion"
|
||||
+ log_fail "pool $TESTPOOL1 did not expand " \
|
||||
+ "after LUN expansion and zpool online -e"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
- log_fail "pool $TESTPOOL1 is not autoexpanded after LUN " \
|
||||
- "expansion"
|
||||
+ log_fail "pool $TESTPOOL1 did not expand after LUN expansion " \
|
||||
+ "and zpool online -e"
|
||||
fi
|
||||
log_must zpool destroy $TESTPOOL1
|
||||
done
|
||||
@@ -1,686 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Hutter <hutter2@llnl.gov>
|
||||
Date: Wed, 6 Jun 2018 09:33:54 -0700
|
||||
Subject: [PATCH] Add pool state /proc entry, "SUSPENDED" pools
|
||||
|
||||
1. Add a proc entry to display the pool's state:
|
||||
|
||||
$ cat /proc/spl/kstat/zfs/tank/state
|
||||
ONLINE
|
||||
|
||||
This is done without using the spa config locks, so it will
|
||||
never hang.
|
||||
|
||||
2. Fix 'zpool status' and 'zpool list -o health' output to print
|
||||
"SUSPENDED" instead of "ONLINE" for suspended pools.
|
||||
|
||||
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
|
||||
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
|
||||
Closes #7331
|
||||
Closes #7563
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
cmd/zpool/zpool_main.c | 3 +-
|
||||
configure.ac | 1 +
|
||||
include/libzfs.h | 2 +
|
||||
include/sys/spa.h | 3 +
|
||||
lib/libspl/include/sys/kstat.h | 2 +
|
||||
lib/libzfs/libzfs_pool.c | 46 +++++--
|
||||
lib/libzfs/libzfs_status.c | 12 +-
|
||||
module/zfs/spa_misc.c | 40 ++++++
|
||||
module/zfs/spa_stats.c | 62 +++++++++
|
||||
tests/runfiles/linux.run | 4 +
|
||||
tests/zfs-tests/include/libtest.shlib | 38 ++++++
|
||||
tests/zfs-tests/tests/functional/Makefile.am | 1 +
|
||||
tests/zfs-tests/tests/functional/kstat/Makefile.am | 5 +
|
||||
tests/zfs-tests/tests/functional/kstat/cleanup.ksh | 28 ++++
|
||||
tests/zfs-tests/tests/functional/kstat/setup.ksh | 34 +++++
|
||||
tests/zfs-tests/tests/functional/kstat/state.ksh | 144 +++++++++++++++++++++
|
||||
16 files changed, 406 insertions(+), 19 deletions(-)
|
||||
create mode 100644 tests/zfs-tests/tests/functional/kstat/Makefile.am
|
||||
create mode 100755 tests/zfs-tests/tests/functional/kstat/cleanup.ksh
|
||||
create mode 100755 tests/zfs-tests/tests/functional/kstat/setup.ksh
|
||||
create mode 100755 tests/zfs-tests/tests/functional/kstat/state.ksh
|
||||
|
||||
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
|
||||
index b0756938..97697011 100644
|
||||
--- a/cmd/zpool/zpool_main.c
|
||||
+++ b/cmd/zpool/zpool_main.c
|
||||
@@ -6226,7 +6226,8 @@ status_callback(zpool_handle_t *zhp, void *data)
|
||||
&nvroot) == 0);
|
||||
verify(nvlist_lookup_uint64_array(nvroot, ZPOOL_CONFIG_VDEV_STATS,
|
||||
(uint64_t **)&vs, &c) == 0);
|
||||
- health = zpool_state_to_name(vs->vs_state, vs->vs_aux);
|
||||
+
|
||||
+ health = zpool_get_state_str(zhp);
|
||||
|
||||
(void) printf(gettext(" pool: %s\n"), zpool_get_name(zhp));
|
||||
(void) printf(gettext(" state: %s\n"), health);
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 3f4925c3..42cfc1a3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -253,6 +253,7 @@ AC_CONFIG_FILES([
|
||||
tests/zfs-tests/tests/functional/history/Makefile
|
||||
tests/zfs-tests/tests/functional/inheritance/Makefile
|
||||
tests/zfs-tests/tests/functional/inuse/Makefile
|
||||
+ tests/zfs-tests/tests/functional/kstat/Makefile
|
||||
tests/zfs-tests/tests/functional/large_files/Makefile
|
||||
tests/zfs-tests/tests/functional/largest_pool/Makefile
|
||||
tests/zfs-tests/tests/functional/link_count/Makefile
|
||||
diff --git a/include/libzfs.h b/include/libzfs.h
|
||||
index 945bd5b8..fea2fee4 100644
|
||||
--- a/include/libzfs.h
|
||||
+++ b/include/libzfs.h
|
||||
@@ -296,6 +296,8 @@ int zfs_dev_is_whole_disk(char *dev_name);
|
||||
char *zfs_get_underlying_path(char *dev_name);
|
||||
char *zfs_get_enclosure_sysfs_path(char *dev_name);
|
||||
|
||||
+const char *zpool_get_state_str(zpool_handle_t *);
|
||||
+
|
||||
/*
|
||||
* Functions to manage pool properties
|
||||
*/
|
||||
diff --git a/include/sys/spa.h b/include/sys/spa.h
|
||||
index 3b268419..810999c9 100644
|
||||
--- a/include/sys/spa.h
|
||||
+++ b/include/sys/spa.h
|
||||
@@ -730,6 +730,7 @@ typedef struct spa_stats {
|
||||
spa_stats_history_t tx_assign_histogram;
|
||||
spa_stats_history_t io_history;
|
||||
spa_stats_history_t mmp_history;
|
||||
+ spa_stats_history_t state; /* pool state */
|
||||
} spa_stats_t;
|
||||
|
||||
typedef enum txg_state {
|
||||
@@ -889,6 +890,8 @@ extern void spa_history_log_internal_ds(struct dsl_dataset *ds, const char *op,
|
||||
extern void spa_history_log_internal_dd(dsl_dir_t *dd, const char *operation,
|
||||
dmu_tx_t *tx, const char *fmt, ...);
|
||||
|
||||
+extern const char *spa_state_to_name(spa_t *spa);
|
||||
+
|
||||
/* error handling */
|
||||
struct zbookmark_phys;
|
||||
extern void spa_log_error(spa_t *spa, zio_t *zio);
|
||||
diff --git a/lib/libspl/include/sys/kstat.h b/lib/libspl/include/sys/kstat.h
|
||||
index fcd3ed98..84c3d7ca 100644
|
||||
--- a/lib/libspl/include/sys/kstat.h
|
||||
+++ b/lib/libspl/include/sys/kstat.h
|
||||
@@ -304,6 +304,8 @@ typedef struct kstat32 {
|
||||
#define KSTAT_FLAG_PERSISTENT 0x08
|
||||
#define KSTAT_FLAG_DORMANT 0x10
|
||||
#define KSTAT_FLAG_INVALID 0x20
|
||||
+#define KSTAT_FLAG_LONGSTRINGS 0x40
|
||||
+#define KSTAT_FLAG_NO_HEADERS 0x80
|
||||
|
||||
/*
|
||||
* Dynamic update support
|
||||
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c
|
||||
index 53bc5034..315ba954 100644
|
||||
--- a/lib/libzfs/libzfs_pool.c
|
||||
+++ b/lib/libzfs/libzfs_pool.c
|
||||
@@ -240,6 +240,38 @@ zpool_pool_state_to_name(pool_state_t state)
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Given a pool handle, return the pool health string ("ONLINE", "DEGRADED",
|
||||
+ * "SUSPENDED", etc).
|
||||
+ */
|
||||
+const char *
|
||||
+zpool_get_state_str(zpool_handle_t *zhp)
|
||||
+{
|
||||
+ zpool_errata_t errata;
|
||||
+ zpool_status_t status;
|
||||
+ nvlist_t *nvroot;
|
||||
+ vdev_stat_t *vs;
|
||||
+ uint_t vsc;
|
||||
+ const char *str;
|
||||
+
|
||||
+ status = zpool_get_status(zhp, NULL, &errata);
|
||||
+
|
||||
+ if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) {
|
||||
+ str = gettext("FAULTED");
|
||||
+ } else if (status == ZPOOL_STATUS_IO_FAILURE_WAIT ||
|
||||
+ status == ZPOOL_STATUS_IO_FAILURE_MMP) {
|
||||
+ str = gettext("SUSPENDED");
|
||||
+ } else {
|
||||
+ verify(nvlist_lookup_nvlist(zpool_get_config(zhp, NULL),
|
||||
+ ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0);
|
||||
+ verify(nvlist_lookup_uint64_array(nvroot,
|
||||
+ ZPOOL_CONFIG_VDEV_STATS, (uint64_t **)&vs, &vsc)
|
||||
+ == 0);
|
||||
+ str = zpool_state_to_name(vs->vs_state, vs->vs_aux);
|
||||
+ }
|
||||
+ return (str);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* Get a zpool property value for 'prop' and return the value in
|
||||
* a pre-allocated buffer.
|
||||
*/
|
||||
@@ -250,9 +282,6 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
|
||||
uint64_t intval;
|
||||
const char *strval;
|
||||
zprop_source_t src = ZPROP_SRC_NONE;
|
||||
- nvlist_t *nvroot;
|
||||
- vdev_stat_t *vs;
|
||||
- uint_t vsc;
|
||||
|
||||
if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) {
|
||||
switch (prop) {
|
||||
@@ -261,7 +290,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
|
||||
break;
|
||||
|
||||
case ZPOOL_PROP_HEALTH:
|
||||
- (void) strlcpy(buf, "FAULTED", len);
|
||||
+ (void) strlcpy(buf, zpool_get_state_str(zhp), len);
|
||||
break;
|
||||
|
||||
case ZPOOL_PROP_GUID:
|
||||
@@ -362,14 +391,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
|
||||
break;
|
||||
|
||||
case ZPOOL_PROP_HEALTH:
|
||||
- verify(nvlist_lookup_nvlist(zpool_get_config(zhp, NULL),
|
||||
- ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0);
|
||||
- verify(nvlist_lookup_uint64_array(nvroot,
|
||||
- ZPOOL_CONFIG_VDEV_STATS, (uint64_t **)&vs, &vsc)
|
||||
- == 0);
|
||||
-
|
||||
- (void) strlcpy(buf, zpool_state_to_name(intval,
|
||||
- vs->vs_aux), len);
|
||||
+ (void) strlcpy(buf, zpool_get_state_str(zhp), len);
|
||||
break;
|
||||
case ZPOOL_PROP_VERSION:
|
||||
if (intval >= SPA_VERSION_FEATURES) {
|
||||
diff --git a/lib/libzfs/libzfs_status.c b/lib/libzfs/libzfs_status.c
|
||||
index 6cdcd382..5e423f3a 100644
|
||||
--- a/lib/libzfs/libzfs_status.c
|
||||
+++ b/lib/libzfs/libzfs_status.c
|
||||
@@ -403,12 +403,12 @@ zpool_status_t
|
||||
zpool_get_status(zpool_handle_t *zhp, char **msgid, zpool_errata_t *errata)
|
||||
{
|
||||
zpool_status_t ret = check_status(zhp->zpool_config, B_FALSE, errata);
|
||||
-
|
||||
- if (ret >= NMSGID)
|
||||
- *msgid = NULL;
|
||||
- else
|
||||
- *msgid = zfs_msgid_table[ret];
|
||||
-
|
||||
+ if (msgid != NULL) {
|
||||
+ if (ret >= NMSGID)
|
||||
+ *msgid = NULL;
|
||||
+ else
|
||||
+ *msgid = zfs_msgid_table[ret];
|
||||
+ }
|
||||
return (ret);
|
||||
}
|
||||
|
||||
diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c
|
||||
index e92c3948..cc1c641d 100644
|
||||
--- a/module/zfs/spa_misc.c
|
||||
+++ b/module/zfs/spa_misc.c
|
||||
@@ -2100,6 +2100,45 @@ spa_get_hostid(void)
|
||||
return (myhostid);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Return the pool state string ("ONLINE", "DEGRADED", "SUSPENDED", etc).
|
||||
+ */
|
||||
+const char *
|
||||
+spa_state_to_name(spa_t *spa)
|
||||
+{
|
||||
+ vdev_state_t state = spa->spa_root_vdev->vdev_state;
|
||||
+ vdev_aux_t aux = spa->spa_root_vdev->vdev_stat.vs_aux;
|
||||
+
|
||||
+ if (spa_suspended(spa) &&
|
||||
+ (spa_get_failmode(spa) != ZIO_FAILURE_MODE_CONTINUE))
|
||||
+ return ("SUSPENDED");
|
||||
+
|
||||
+ switch (state) {
|
||||
+ case VDEV_STATE_CLOSED:
|
||||
+ case VDEV_STATE_OFFLINE:
|
||||
+ return ("OFFLINE");
|
||||
+ case VDEV_STATE_REMOVED:
|
||||
+ return ("REMOVED");
|
||||
+ case VDEV_STATE_CANT_OPEN:
|
||||
+ if (aux == VDEV_AUX_CORRUPT_DATA || aux == VDEV_AUX_BAD_LOG)
|
||||
+ return ("FAULTED");
|
||||
+ else if (aux == VDEV_AUX_SPLIT_POOL)
|
||||
+ return ("SPLIT");
|
||||
+ else
|
||||
+ return ("UNAVAIL");
|
||||
+ case VDEV_STATE_FAULTED:
|
||||
+ return ("FAULTED");
|
||||
+ case VDEV_STATE_DEGRADED:
|
||||
+ return ("DEGRADED");
|
||||
+ case VDEV_STATE_HEALTHY:
|
||||
+ return ("ONLINE");
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return ("UNKNOWN");
|
||||
+}
|
||||
+
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
/* Namespace manipulation */
|
||||
EXPORT_SYMBOL(spa_lookup);
|
||||
@@ -2178,6 +2217,7 @@ EXPORT_SYMBOL(spa_is_root);
|
||||
EXPORT_SYMBOL(spa_writeable);
|
||||
EXPORT_SYMBOL(spa_mode);
|
||||
EXPORT_SYMBOL(spa_namespace_lock);
|
||||
+EXPORT_SYMBOL(spa_state_to_name);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
module_param(zfs_flags, uint, 0644);
|
||||
diff --git a/module/zfs/spa_stats.c b/module/zfs/spa_stats.c
|
||||
index 8950d9c5..ca3d0be7 100644
|
||||
--- a/module/zfs/spa_stats.c
|
||||
+++ b/module/zfs/spa_stats.c
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <sys/zfs_context.h>
|
||||
#include <sys/spa_impl.h>
|
||||
#include <sys/vdev_impl.h>
|
||||
+#include <sys/spa.h>
|
||||
+#include <zfs_comutil.h>
|
||||
|
||||
/*
|
||||
* Keeps stats on last N reads per spa_t, disabled by default.
|
||||
@@ -992,6 +994,64 @@ spa_mmp_history_add(spa_t *spa, uint64_t txg, uint64_t timestamp,
|
||||
return ((void *)smh);
|
||||
}
|
||||
|
||||
+static void *
|
||||
+spa_state_addr(kstat_t *ksp, loff_t n)
|
||||
+{
|
||||
+ return (ksp->ks_private); /* return the spa_t */
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+spa_state_data(char *buf, size_t size, void *data)
|
||||
+{
|
||||
+ spa_t *spa = (spa_t *)data;
|
||||
+ (void) snprintf(buf, size, "%s\n", spa_state_to_name(spa));
|
||||
+ return (0);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Return the state of the pool in /proc/spl/kstat/zfs/<pool>/state.
|
||||
+ *
|
||||
+ * This is a lock-less read of the pool's state (unlike using 'zpool', which
|
||||
+ * can potentially block for seconds). Because it doesn't block, it can useful
|
||||
+ * as a pool heartbeat value.
|
||||
+ */
|
||||
+static void
|
||||
+spa_state_init(spa_t *spa)
|
||||
+{
|
||||
+ spa_stats_history_t *ssh = &spa->spa_stats.state;
|
||||
+ char *name;
|
||||
+ kstat_t *ksp;
|
||||
+
|
||||
+ mutex_init(&ssh->lock, NULL, MUTEX_DEFAULT, NULL);
|
||||
+
|
||||
+ name = kmem_asprintf("zfs/%s", spa_name(spa));
|
||||
+ ksp = kstat_create(name, 0, "state", "misc",
|
||||
+ KSTAT_TYPE_RAW, 0, KSTAT_FLAG_VIRTUAL);
|
||||
+
|
||||
+ ssh->kstat = ksp;
|
||||
+ if (ksp) {
|
||||
+ ksp->ks_lock = &ssh->lock;
|
||||
+ ksp->ks_data = NULL;
|
||||
+ ksp->ks_private = spa;
|
||||
+ ksp->ks_flags |= KSTAT_FLAG_NO_HEADERS;
|
||||
+ kstat_set_raw_ops(ksp, NULL, spa_state_data, spa_state_addr);
|
||||
+ kstat_install(ksp);
|
||||
+ }
|
||||
+
|
||||
+ strfree(name);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+spa_health_destroy(spa_t *spa)
|
||||
+{
|
||||
+ spa_stats_history_t *ssh = &spa->spa_stats.state;
|
||||
+ kstat_t *ksp = ssh->kstat;
|
||||
+ if (ksp)
|
||||
+ kstat_delete(ksp);
|
||||
+
|
||||
+ mutex_destroy(&ssh->lock);
|
||||
+}
|
||||
+
|
||||
void
|
||||
spa_stats_init(spa_t *spa)
|
||||
{
|
||||
@@ -1000,11 +1060,13 @@ spa_stats_init(spa_t *spa)
|
||||
spa_tx_assign_init(spa);
|
||||
spa_io_history_init(spa);
|
||||
spa_mmp_history_init(spa);
|
||||
+ spa_state_init(spa);
|
||||
}
|
||||
|
||||
void
|
||||
spa_stats_destroy(spa_t *spa)
|
||||
{
|
||||
+ spa_health_destroy(spa);
|
||||
spa_tx_assign_destroy(spa);
|
||||
spa_txg_history_destroy(spa);
|
||||
spa_read_history_destroy(spa);
|
||||
diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run
|
||||
index 379c9f73..69e9eb26 100644
|
||||
--- a/tests/runfiles/linux.run
|
||||
+++ b/tests/runfiles/linux.run
|
||||
@@ -467,6 +467,10 @@ tests = ['inuse_001_pos', 'inuse_003_pos', 'inuse_004_pos',
|
||||
post =
|
||||
tags = ['functional', 'inuse']
|
||||
|
||||
+[tests/functional/kstat]
|
||||
+tests = ['state']
|
||||
+tags = ['functional', 'kstat']
|
||||
+
|
||||
[tests/functional/large_files]
|
||||
tests = ['large_files_001_pos', 'large_files_002_pos']
|
||||
tags = ['functional', 'large_files']
|
||||
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib
|
||||
index 13c85912..86dae6ea 100644
|
||||
--- a/tests/zfs-tests/include/libtest.shlib
|
||||
+++ b/tests/zfs-tests/include/libtest.shlib
|
||||
@@ -26,6 +26,7 @@
|
||||
# Copyright 2016 Nexenta Systems, Inc.
|
||||
# Copyright (c) 2017 Lawrence Livermore National Security, LLC.
|
||||
# Copyright (c) 2017 Datto Inc.
|
||||
+# Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
|
||||
#
|
||||
|
||||
. ${STF_TOOLS}/include/logapi.shlib
|
||||
@@ -3718,3 +3719,40 @@ function get_pool_devices #testpool #devdir
|
||||
fi
|
||||
echo $out
|
||||
}
|
||||
+
|
||||
+#
|
||||
+# Get scsi_debug device name.
|
||||
+# Returns basename of scsi_debug device (for example "sdb").
|
||||
+#
|
||||
+function get_debug_device
|
||||
+{
|
||||
+ for i in {1..10} ; do
|
||||
+ val=$(lsscsi | nawk '/scsi_debug/ {print $6; exit}' | cut -d / -f3)
|
||||
+
|
||||
+ # lsscsi can take time to settle
|
||||
+ if [ "$val" != "-" ] ; then
|
||||
+ break
|
||||
+ fi
|
||||
+ sleep 1
|
||||
+ done
|
||||
+ echo "$val"
|
||||
+}
|
||||
+
|
||||
+#
|
||||
+# Returns SCSI host number for the given disk
|
||||
+#
|
||||
+function get_scsi_host #disk
|
||||
+{
|
||||
+ typeset disk=$1
|
||||
+ ls /sys/block/${disk}/device/scsi_device | cut -d : -f 1
|
||||
+}
|
||||
+
|
||||
+#
|
||||
+# Simulate disk removal
|
||||
+#
|
||||
+function remove_disk #disk
|
||||
+{
|
||||
+ typeset disk=$1
|
||||
+ on_off_disk $disk "offline"
|
||||
+ block_device_wait
|
||||
+}
|
||||
diff --git a/tests/zfs-tests/tests/functional/Makefile.am b/tests/zfs-tests/tests/functional/Makefile.am
|
||||
index ea52205a..bbbf3ba0 100644
|
||||
--- a/tests/zfs-tests/tests/functional/Makefile.am
|
||||
+++ b/tests/zfs-tests/tests/functional/Makefile.am
|
||||
@@ -24,6 +24,7 @@ SUBDIRS = \
|
||||
history \
|
||||
inheritance \
|
||||
inuse \
|
||||
+ kstat \
|
||||
large_files \
|
||||
largest_pool \
|
||||
libzfs \
|
||||
diff --git a/tests/zfs-tests/tests/functional/kstat/Makefile.am b/tests/zfs-tests/tests/functional/kstat/Makefile.am
|
||||
new file mode 100644
|
||||
index 00000000..8ad83ec3
|
||||
--- /dev/null
|
||||
+++ b/tests/zfs-tests/tests/functional/kstat/Makefile.am
|
||||
@@ -0,0 +1,5 @@
|
||||
+pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/kstat
|
||||
+dist_pkgdata_SCRIPTS = \
|
||||
+ setup.ksh \
|
||||
+ cleanup.ksh \
|
||||
+ state.ksh
|
||||
diff --git a/tests/zfs-tests/tests/functional/kstat/cleanup.ksh b/tests/zfs-tests/tests/functional/kstat/cleanup.ksh
|
||||
new file mode 100755
|
||||
index 00000000..8a212ce3
|
||||
--- /dev/null
|
||||
+++ b/tests/zfs-tests/tests/functional/kstat/cleanup.ksh
|
||||
@@ -0,0 +1,28 @@
|
||||
+#!/bin/ksh -p
|
||||
+#
|
||||
+# CDDL HEADER START
|
||||
+#
|
||||
+# The contents of this file are subject to the terms of the
|
||||
+# Common Development and Distribution License (the "License").
|
||||
+# You may not use this file except in compliance with the License.
|
||||
+#
|
||||
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
+# or http://www.opensolaris.org/os/licensing.
|
||||
+# See the License for the specific language governing permissions
|
||||
+# and limitations under the License.
|
||||
+#
|
||||
+# When distributing Covered Code, include this CDDL HEADER in each
|
||||
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
+# If applicable, add the following below this CDDL HEADER, with the
|
||||
+# fields enclosed by brackets "[]" replaced with your own identifying
|
||||
+# information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
+#
|
||||
+# CDDL HEADER END
|
||||
+#
|
||||
+#
|
||||
+# Copyright (c) 2018 by Lawrence Livermore National Security, LLC.
|
||||
+#
|
||||
+
|
||||
+. $STF_SUITE/include/libtest.shlib
|
||||
+
|
||||
+default_cleanup
|
||||
diff --git a/tests/zfs-tests/tests/functional/kstat/setup.ksh b/tests/zfs-tests/tests/functional/kstat/setup.ksh
|
||||
new file mode 100755
|
||||
index 00000000..57717a09
|
||||
--- /dev/null
|
||||
+++ b/tests/zfs-tests/tests/functional/kstat/setup.ksh
|
||||
@@ -0,0 +1,34 @@
|
||||
+#!/bin/ksh -p
|
||||
+#
|
||||
+# CDDL HEADER START
|
||||
+#
|
||||
+# The contents of this file are subject to the terms of the
|
||||
+# Common Development and Distribution License (the "License").
|
||||
+# You may not use this file except in compliance with the License.
|
||||
+#
|
||||
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
+# or http://www.opensolaris.org/os/licensing.
|
||||
+# See the License for the specific language governing permissions
|
||||
+# and limitations under the License.
|
||||
+#
|
||||
+# When distributing Covered Code, include this CDDL HEADER in each
|
||||
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
+# If applicable, add the following below this CDDL HEADER, with the
|
||||
+# fields enclosed by brackets "[]" replaced with your own identifying
|
||||
+# information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
+#
|
||||
+# CDDL HEADER END
|
||||
+#
|
||||
+#
|
||||
+# Copyright (c) 2018 by Lawrence Livermore National Security, LLC.
|
||||
+#
|
||||
+
|
||||
+. $STF_SUITE/include/libtest.shlib
|
||||
+
|
||||
+if ! is_linux ; then
|
||||
+ log_unsupported "/proc/spl/kstat/<pool>/health only supported on Linux"
|
||||
+fi
|
||||
+
|
||||
+default_mirror_setup $DISKS
|
||||
+
|
||||
+log_pass
|
||||
diff --git a/tests/zfs-tests/tests/functional/kstat/state.ksh b/tests/zfs-tests/tests/functional/kstat/state.ksh
|
||||
new file mode 100755
|
||||
index 00000000..bf0b6e31
|
||||
--- /dev/null
|
||||
+++ b/tests/zfs-tests/tests/functional/kstat/state.ksh
|
||||
@@ -0,0 +1,144 @@
|
||||
+#!/bin/ksh -p
|
||||
+#
|
||||
+# CDDL HEADER START
|
||||
+#
|
||||
+# The contents of this file are subject to the terms of the
|
||||
+# Common Development and Distribution License (the "License").
|
||||
+# You may not use this file except in compliance with the License.
|
||||
+#
|
||||
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
+# or http://www.opensolaris.org/os/licensing.
|
||||
+# See the License for the specific language governing permissions
|
||||
+# and limitations under the License.
|
||||
+#
|
||||
+# When distributing Covered Code, include this CDDL HEADER in each
|
||||
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
+# If applicable, add the following below this CDDL HEADER, with the
|
||||
+# fields enclosed by brackets "[]" replaced with your own identifying
|
||||
+# information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
+#
|
||||
+# CDDL HEADER END
|
||||
+
|
||||
+#
|
||||
+# Copyright (c) 2018 by Lawrence Livermore National Security, LLC.
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# DESCRIPTION:
|
||||
+# Test /proc/spl/kstat/zfs/<pool>/state kstat
|
||||
+#
|
||||
+# STRATEGY:
|
||||
+# 1. Create a mirrored pool
|
||||
+# 2. Check that pool is ONLINE
|
||||
+# 3. Fault one disk
|
||||
+# 4. Check that pool is DEGRADED
|
||||
+# 5. Create a new pool with a single scsi_debug disk
|
||||
+# 6. Remove the disk
|
||||
+# 7. Check that pool is SUSPENDED
|
||||
+# 8. Add the disk back in
|
||||
+# 9. Clear errors and destroy the pools
|
||||
+
|
||||
+. $STF_SUITE/include/libtest.shlib
|
||||
+
|
||||
+verify_runnable "both"
|
||||
+
|
||||
+function cleanup
|
||||
+{
|
||||
+ # Destroy the scsi_debug pool
|
||||
+ if [ -n "$TESTPOOL2" ] ; then
|
||||
+ if [ -n "$host" ] ; then
|
||||
+ # Re-enable the disk
|
||||
+ scan_scsi_hosts $host
|
||||
+
|
||||
+ # Device may have changed names after being inserted
|
||||
+ SDISK=$(get_debug_device)
|
||||
+ log_must ln $DEV_RDSKDIR/$SDISK $REALDISK
|
||||
+ fi
|
||||
+
|
||||
+ # Restore our working pool image
|
||||
+ if [ -n "$BACKUP" ] ; then
|
||||
+ gunzip -c $BACKUP > $REALDISK
|
||||
+ log_must rm -f $BACKUP
|
||||
+ fi
|
||||
+
|
||||
+ # Our disk is back. Now we can clear errors and destroy the
|
||||
+ # pool cleanly.
|
||||
+ log_must zpool clear $TESTPOOL2
|
||||
+
|
||||
+ # Now that the disk is back and errors cleared, wait for our
|
||||
+ # hung 'zpool scrub' to finish.
|
||||
+ wait
|
||||
+
|
||||
+ destroy_pool $TESTPOOL2
|
||||
+ log_must rm $REALDISK
|
||||
+ unload_scsi_debug
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+# Check that our pool state values match what's expected
|
||||
+#
|
||||
+# $1: pool name
|
||||
+# $2: expected state ("ONLINE", "DEGRADED", "SUSPENDED", etc)
|
||||
+function check_all
|
||||
+{
|
||||
+ pool=$1
|
||||
+ expected=$2
|
||||
+
|
||||
+ state1=$(zpool status $pool | awk '/state: /{print $2}');
|
||||
+ state2=$(zpool list -H -o health $pool)
|
||||
+ state3=$(cat /proc/spl/kstat/zfs/$pool/state)
|
||||
+ log_note "Checking $expected = $state1 = $state2 = $state3"
|
||||
+ if [[ "$expected" == "$state1" && "$expected" == "$state2" && \
|
||||
+ "$expected" == "$state3" ]] ; then
|
||||
+ true
|
||||
+ else
|
||||
+ false
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+log_onexit cleanup
|
||||
+
|
||||
+log_assert "Testing /proc/spl/kstat/zfs/<pool>/state kstat"
|
||||
+
|
||||
+# Test that the initial pool is healthy
|
||||
+check_all $TESTPOOL "ONLINE"
|
||||
+
|
||||
+# Fault one of the disks, and check that pool is degraded
|
||||
+DISK1=$(echo "$DISKS" | awk '{print $2}')
|
||||
+zpool offline -tf $TESTPOOL $DISK1
|
||||
+check_all $TESTPOOL "DEGRADED"
|
||||
+
|
||||
+# Create a new pool out of a scsi_debug disk
|
||||
+TESTPOOL2=testpool2
|
||||
+MINVDEVSIZE_MB=$((MINVDEVSIZE / 1048576))
|
||||
+load_scsi_debug $MINVDEVSIZE_MB 1 1 1 '512b'
|
||||
+
|
||||
+SDISK=$(get_debug_device)
|
||||
+host=$(get_scsi_host $SDISK)
|
||||
+
|
||||
+# Use $REALDISK instead of $SDISK in our pool because $SDISK can change names
|
||||
+# as we remove/add the disk (i.e. /dev/sdf -> /dev/sdg).
|
||||
+REALDISK=/dev/kstat-state-realdisk
|
||||
+log_must [ ! -e $REALDISK ]
|
||||
+ln $DEV_RDSKDIR/$SDISK $REALDISK
|
||||
+
|
||||
+log_must zpool create $TESTPOOL2 $REALDISK
|
||||
+
|
||||
+# Backup the contents of the disk image
|
||||
+BACKUP=/tmp/kstat-state-realdisk.gz
|
||||
+log_must [ ! -e $BACKUP ]
|
||||
+gzip -c $REALDISK > $BACKUP
|
||||
+
|
||||
+# Yank out the disk from under the pool
|
||||
+log_must rm $REALDISK
|
||||
+remove_disk $SDISK
|
||||
+
|
||||
+# Run a 'zpool scrub' in the background to suspend the pool. We run it in the
|
||||
+# background since the command will hang when the pool gets suspended. The
|
||||
+# command will resume and exit after we restore the missing disk later on.
|
||||
+zpool scrub $TESTPOOL2 &
|
||||
+sleep 1 # Give the scrub some time to run before we check if it fails
|
||||
+
|
||||
+log_must check_all $TESTPOOL2 "SUSPENDED"
|
||||
+
|
||||
+log_pass "/proc/spl/kstat/zfs/<pool>/state test successful"
|
||||
@@ -1,115 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Tue, 19 Jun 2018 21:52:45 -0700
|
||||
Subject: [PATCH] Linux 4.14 compat: blk_queue_stackable()
|
||||
|
||||
The blk_queue_stackable() function was replaced in the 4.14 kernel
|
||||
by queue_is_rq_based(), commit torvalds/linux@5fdee212. This change
|
||||
resulted in the default elevator being used which can negatively
|
||||
impact performance.
|
||||
|
||||
Rather than adding additional compatibility code to detect the
|
||||
new interface unconditionally attempt to set the elevator. Since
|
||||
we expect this to fail for block devices without an elevator the
|
||||
error message has been moved in to zfs_dbgmsg().
|
||||
|
||||
Finally, it was observed that the elevator_change() was removed
|
||||
from the 4.12 kernel, commit torvalds/linux@c033269. Update the
|
||||
comment to clearly specify which are expected to export the
|
||||
elevator_change() symbol.
|
||||
|
||||
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
|
||||
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #7645
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
config/kernel-elevator-change.m4 | 4 ++--
|
||||
include/linux/blkdev_compat.h | 11 -----------
|
||||
module/zfs/vdev_disk.c | 22 ++++++++++------------
|
||||
3 files changed, 12 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/config/kernel-elevator-change.m4 b/config/kernel-elevator-change.m4
|
||||
index ace5aa82..eba25257 100644
|
||||
--- a/config/kernel-elevator-change.m4
|
||||
+++ b/config/kernel-elevator-change.m4
|
||||
@@ -1,6 +1,6 @@
|
||||
dnl #
|
||||
-dnl # 2.6.36 API change
|
||||
-dnl # Verify the elevator_change() symbol is available.
|
||||
+dnl # 2.6.36 API, exported elevator_change() symbol
|
||||
+dnl # 4.12 API, removed elevator_change() symbol
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_ELEVATOR_CHANGE], [
|
||||
AC_MSG_CHECKING([whether elevator_change() is available])
|
||||
diff --git a/include/linux/blkdev_compat.h b/include/linux/blkdev_compat.h
|
||||
index 27f05662..c8cdf38e 100644
|
||||
--- a/include/linux/blkdev_compat.h
|
||||
+++ b/include/linux/blkdev_compat.h
|
||||
@@ -106,17 +106,6 @@ blk_queue_set_write_cache(struct request_queue *q, bool wc, bool fua)
|
||||
#endif
|
||||
|
||||
/*
|
||||
- * 2.6.27 API change,
|
||||
- * The blk_queue_stackable() queue flag was added in 2.6.27 to handle dm
|
||||
- * stacking drivers. Prior to this request stacking drivers were detected
|
||||
- * by checking (q->request_fn == NULL), for earlier kernels we revert to
|
||||
- * this legacy behavior.
|
||||
- */
|
||||
-#ifndef blk_queue_stackable
|
||||
-#define blk_queue_stackable(q) ((q)->request_fn == NULL)
|
||||
-#endif
|
||||
-
|
||||
-/*
|
||||
* 2.6.34 API change,
|
||||
* The blk_queue_max_hw_sectors() function replaces blk_queue_max_sectors().
|
||||
*/
|
||||
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
|
||||
index 6dc0544f..c5708cb2 100644
|
||||
--- a/module/zfs/vdev_disk.c
|
||||
+++ b/module/zfs/vdev_disk.c
|
||||
@@ -168,23 +168,20 @@ vdev_elevator_switch(vdev_t *v, char *elevator)
|
||||
if (!v->vdev_wholedisk && strncmp(device, "dm-", 3) != 0)
|
||||
return;
|
||||
|
||||
- /* Skip devices without schedulers (loop, ram, dm, etc) */
|
||||
- if (!q->elevator || !blk_queue_stackable(q))
|
||||
- return;
|
||||
-
|
||||
/* Leave existing scheduler when set to "none" */
|
||||
if ((strncmp(elevator, "none", 4) == 0) && (strlen(elevator) == 4))
|
||||
return;
|
||||
|
||||
+ /*
|
||||
+ * The elevator_change() function was available in kernels from
|
||||
+ * 2.6.36 to 4.11. When not available fall back to using the user
|
||||
+ * mode helper functionality to set the elevator via sysfs. This
|
||||
+ * requires /bin/echo and sysfs to be mounted which may not be true
|
||||
+ * early in the boot process.
|
||||
+ */
|
||||
#ifdef HAVE_ELEVATOR_CHANGE
|
||||
error = elevator_change(q, elevator);
|
||||
#else
|
||||
- /*
|
||||
- * For pre-2.6.36 kernels elevator_change() is not available.
|
||||
- * Therefore we fall back to using a usermodehelper to echo the
|
||||
- * elevator into sysfs; This requires /bin/echo and sysfs to be
|
||||
- * mounted which may not be true early in the boot process.
|
||||
- */
|
||||
#define SET_SCHEDULER_CMD \
|
||||
"exec 0</dev/null " \
|
||||
" 1>/sys/block/%s/queue/scheduler " \
|
||||
@@ -198,9 +195,10 @@ vdev_elevator_switch(vdev_t *v, char *elevator)
|
||||
error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
|
||||
strfree(argv[2]);
|
||||
#endif /* HAVE_ELEVATOR_CHANGE */
|
||||
- if (error)
|
||||
- printk("ZFS: Unable to set \"%s\" scheduler for %s (%s): %d\n",
|
||||
+ if (error) {
|
||||
+ zfs_dbgmsg("Unable to set \"%s\" scheduler for %s (%s): %d\n",
|
||||
elevator, v->vdev_path, device, error);
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1,54 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Troels=20N=C3=B8rgaard?= <tnn@tradeshift.com>
|
||||
Date: Sat, 7 Jul 2018 01:15:19 +0200
|
||||
Subject: [PATCH] Default ashift for Amazon EC2 NVMe devices
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add a default 4 KiB ashift for Amazon EC2 NVMe devices on instances with
|
||||
NVMe ephemeral devices, such as the types c5d, f1, i3 and m5d.
|
||||
As per the official documentation [1] a 4096 byte blocksize should be
|
||||
used to match the underlying hardware.
|
||||
|
||||
The string was identified via:
|
||||
|
||||
$ sudo sginfo -M /dev/nvme0n1
|
||||
INQUIRY response (cmd: 0x12)
|
||||
----------------------------
|
||||
Device Type 0
|
||||
Vendor: NVMe
|
||||
Product: Amazon EC2 NVMe
|
||||
Revision level:
|
||||
|
||||
$ lsblk -io KNAME,TYPE,SIZE,MODEL
|
||||
KNAME TYPE SIZE MODEL
|
||||
nvme0n1 disk 442.4G Amazon EC2 NVMe Instance Storage
|
||||
|
||||
[1] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/
|
||||
storage-optimized-instances.html
|
||||
Retrived 2018-07-03
|
||||
|
||||
Reviewed-by: George Melikov <mail@gmelikov.ru>
|
||||
Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Signed-off-by: Troels Nørgaard <tnn@tradeshift.com>
|
||||
Closes #7676
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
cmd/zpool/zpool_vdev.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c
|
||||
index fd6bd9e7..69ff7ff6 100644
|
||||
--- a/cmd/zpool/zpool_vdev.c
|
||||
+++ b/cmd/zpool/zpool_vdev.c
|
||||
@@ -191,6 +191,7 @@ static vdev_disk_db_entry_t vdev_disk_database[] = {
|
||||
{"ATA INTEL SSDSC2BP24", 4096},
|
||||
{"ATA INTEL SSDSC2BP48", 4096},
|
||||
{"NA SmrtStorSDLKAE9W", 4096},
|
||||
+ {"NVMe Amazon EC2 NVMe ", 4096},
|
||||
/* Imported from Open Solaris */
|
||||
{"ATA MARVELL SD88SA02", 4096},
|
||||
/* Advanced format Hard drives */
|
||||
@@ -1,123 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Wed, 11 Jul 2018 13:10:40 -0700
|
||||
Subject: [PATCH] Fix kernel unaligned access on sparc64
|
||||
|
||||
Update the SA_COPY_DATA macro to check if architecture supports
|
||||
efficient unaligned memory accesses at compile time. Otherwise
|
||||
fallback to using the sa_copy_data() function.
|
||||
|
||||
The kernel provided CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is
|
||||
used to determine availability in kernel space. In user space
|
||||
the x86_64, x86, powerpc, and sometimes arm architectures will
|
||||
define the HAVE_EFFICIENT_UNALIGNED_ACCESS macro.
|
||||
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #7642
|
||||
Closes #7684
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
lib/libspl/include/sys/isa_defs.h | 7 +++++++
|
||||
module/icp/algs/modes/ccm.c | 2 +-
|
||||
module/zfs/sa.c | 35 ++++++++++++++++++++---------------
|
||||
3 files changed, 28 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/lib/libspl/include/sys/isa_defs.h b/lib/libspl/include/sys/isa_defs.h
|
||||
index a5bea039..7a90e077 100644
|
||||
--- a/lib/libspl/include/sys/isa_defs.h
|
||||
+++ b/lib/libspl/include/sys/isa_defs.h
|
||||
@@ -55,6 +55,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#define _SUNOS_VTOC_16
|
||||
+#define HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
|
||||
/* i386 arch specific defines */
|
||||
#elif defined(__i386) || defined(__i386__)
|
||||
@@ -76,6 +77,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#define _SUNOS_VTOC_16
|
||||
+#define HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
|
||||
/* powerpc arch specific defines */
|
||||
#elif defined(__powerpc) || defined(__powerpc__) || defined(__powerpc64__)
|
||||
@@ -99,6 +101,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#define _SUNOS_VTOC_16
|
||||
+#define HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
|
||||
/* arm arch specific defines */
|
||||
#elif defined(__arm) || defined(__arm__) || defined(__aarch64__)
|
||||
@@ -129,6 +132,10 @@ extern "C" {
|
||||
|
||||
#define _SUNOS_VTOC_16
|
||||
|
||||
+#if defined(__ARM_FEATURE_UNALIGNED)
|
||||
+#define HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
+#endif
|
||||
+
|
||||
/* sparc arch specific defines */
|
||||
#elif defined(__sparc) || defined(__sparc__)
|
||||
|
||||
diff --git a/module/icp/algs/modes/ccm.c b/module/icp/algs/modes/ccm.c
|
||||
index 22aeb0a6..fb41194f 100644
|
||||
--- a/module/icp/algs/modes/ccm.c
|
||||
+++ b/module/icp/algs/modes/ccm.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <sys/crypto/common.h>
|
||||
#include <sys/crypto/impl.h>
|
||||
|
||||
-#if defined(__i386) || defined(__amd64)
|
||||
+#ifdef HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
#include <sys/byteorder.h>
|
||||
#define UNALIGNED_POINTERS_PERMITTED
|
||||
#endif
|
||||
diff --git a/module/zfs/sa.c b/module/zfs/sa.c
|
||||
index 8046dbde..1fb1a8b5 100644
|
||||
--- a/module/zfs/sa.c
|
||||
+++ b/module/zfs/sa.c
|
||||
@@ -147,21 +147,26 @@ arc_byteswap_func_t sa_bswap_table[] = {
|
||||
zfs_acl_byteswap,
|
||||
};
|
||||
|
||||
-#define SA_COPY_DATA(f, s, t, l) \
|
||||
- { \
|
||||
- if (f == NULL) { \
|
||||
- if (l == 8) { \
|
||||
- *(uint64_t *)t = *(uint64_t *)s; \
|
||||
- } else if (l == 16) { \
|
||||
- *(uint64_t *)t = *(uint64_t *)s; \
|
||||
- *(uint64_t *)((uintptr_t)t + 8) = \
|
||||
- *(uint64_t *)((uintptr_t)s + 8); \
|
||||
- } else { \
|
||||
- bcopy(s, t, l); \
|
||||
- } \
|
||||
- } else \
|
||||
- sa_copy_data(f, s, t, l); \
|
||||
- }
|
||||
+#ifdef HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
+#define SA_COPY_DATA(f, s, t, l) \
|
||||
+do { \
|
||||
+ if (f == NULL) { \
|
||||
+ if (l == 8) { \
|
||||
+ *(uint64_t *)t = *(uint64_t *)s; \
|
||||
+ } else if (l == 16) { \
|
||||
+ *(uint64_t *)t = *(uint64_t *)s; \
|
||||
+ *(uint64_t *)((uintptr_t)t + 8) = \
|
||||
+ *(uint64_t *)((uintptr_t)s + 8); \
|
||||
+ } else { \
|
||||
+ bcopy(s, t, l); \
|
||||
+ } \
|
||||
+ } else { \
|
||||
+ sa_copy_data(f, s, t, l); \
|
||||
+ } \
|
||||
+} while (0)
|
||||
+#else
|
||||
+#define SA_COPY_DATA(f, s, t, l) sa_copy_data(f, s, t, l)
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* This table is fixed and cannot be changed. Its purpose is to
|
||||
@@ -1,91 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 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
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
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 2326da42..927153b2 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 fc10271b..5c426b0a 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));
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Toomas Soome <tsoome@me.com>
|
||||
Date: Wed, 1 Jun 2016 19:18:10 +0300
|
||||
Subject: [PATCH] OpenZFS 8906 - uts: illumos rootfs should support salted
|
||||
cksum
|
||||
|
||||
Porting notes:
|
||||
* As of grub-2.02 these checksums are not supported. However, as
|
||||
pointed out in #6501 there are alternatives such as EFISTUB which
|
||||
work and have no such restriction. A warning was added to the
|
||||
checksum property section of the zfs.8 man page.
|
||||
|
||||
Authored by: Toomas Soome <tsoome@me.com>
|
||||
Reviewed by: C Fraire <cfraire@me.com>
|
||||
Reviewed by: Robert Mustacchi <rm@joyent.com>
|
||||
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
|
||||
Approved by: Dan McDonald <danmcd@joyent.com>
|
||||
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
|
||||
OpenZFS-issue: https://illumos.org/issues/8906
|
||||
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/7dec52f
|
||||
Closes #6501
|
||||
Closes #7714
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
man/man5/zpool-features.5 | 18 +++++++-----------
|
||||
man/man8/zfs.8 | 5 ++++-
|
||||
module/zfs/zfs_ioctl.c | 11 +----------
|
||||
3 files changed, 12 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/man/man5/zpool-features.5 b/man/man5/zpool-features.5
|
||||
index 78ea559f..140ce269 100644
|
||||
--- a/man/man5/zpool-features.5
|
||||
+++ b/man/man5/zpool-features.5
|
||||
@@ -14,7 +14,7 @@
|
||||
.\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your
|
||||
.\" own identifying information:
|
||||
.\" Portions Copyright [yyyy] [name of copyright owner]
|
||||
-.TH ZPOOL-FEATURES 5 "Aug 27, 2013"
|
||||
+.TH ZPOOL-FEATURES 5 "Jun 8, 2018"
|
||||
.SH NAME
|
||||
zpool\-features \- ZFS pool feature descriptions
|
||||
.SH DESCRIPTION
|
||||
@@ -248,8 +248,9 @@ immediately activate the \fBlz4_compress\fR feature on the underlying
|
||||
pool using the \fBzfs\fR(1M) command. Also, all newly written metadata
|
||||
will be compressed with \fBlz4\fR algorithm. Since this feature is not
|
||||
read-only compatible, this operation will render the pool unimportable
|
||||
-on systems without support for the \fBlz4_compress\fR feature. Booting
|
||||
-off of \fBlz4\fR-compressed root pools is supported.
|
||||
+on systems without support for the \fBlz4_compress\fR feature.
|
||||
+
|
||||
+Booting off of \fBlz4\fR-compressed root pools is supported.
|
||||
|
||||
This feature becomes \fBactive\fR as soon as it is enabled and will
|
||||
never return to being \fBenabled\fB.
|
||||
@@ -510,8 +511,7 @@ can turn on the \fBsha512\fR checksum on any dataset using the
|
||||
and will return to being \fBenabled\fR once all filesystems that have
|
||||
ever had their checksum set to \fBsha512\fR are destroyed.
|
||||
|
||||
-Booting off of pools utilizing SHA-512/256 is supported (provided that
|
||||
-the updated GRUB stage2 module is installed).
|
||||
+Booting off of pools utilizing SHA-512/256 is supported.
|
||||
|
||||
.RE
|
||||
|
||||
@@ -545,9 +545,7 @@ can turn on the \fBskein\fR checksum on any dataset using the
|
||||
and will return to being \fBenabled\fR once all filesystems that have
|
||||
ever had their checksum set to \fBskein\fR are destroyed.
|
||||
|
||||
-Booting off of pools using \fBskein\fR is \fBNOT\fR supported
|
||||
--- any attempt to enable \fBskein\fR on a root pool will fail with an
|
||||
-error.
|
||||
+Booting off of pools using \fBskein\fR is supported.
|
||||
|
||||
.RE
|
||||
|
||||
@@ -587,9 +585,7 @@ can turn on the \fBedonr\fR checksum on any dataset using the
|
||||
and will return to being \fBenabled\fR once all filesystems that have
|
||||
ever had their checksum set to \fBedonr\fR are destroyed.
|
||||
|
||||
-Booting off of pools using \fBedonr\fR is \fBNOT\fR supported
|
||||
--- any attempt to enable \fBedonr\fR on a root pool will fail with an
|
||||
-error.
|
||||
+Booting off of pools using \fBedonr\fR is supported.
|
||||
|
||||
.RE
|
||||
|
||||
diff --git a/man/man8/zfs.8 b/man/man8/zfs.8
|
||||
index 48a5e6ea..bb3b46e3 100644
|
||||
--- a/man/man8/zfs.8
|
||||
+++ b/man/man8/zfs.8
|
||||
@@ -29,7 +29,7 @@
|
||||
.\" Copyright 2016 Nexenta Systems, Inc.
|
||||
.\" Copyright 2016 Richard Laager. All rights reserved.
|
||||
.\"
|
||||
-.Dd June 28, 2017
|
||||
+.Dd July 13, 2018
|
||||
.Dt ZFS 8 SMM
|
||||
.Os Linux
|
||||
.Sh NAME
|
||||
@@ -1049,6 +1049,9 @@ The
|
||||
and
|
||||
.Sy edonr
|
||||
checksum algorithms require enabling the appropriate features on the pool.
|
||||
+These algorithms are not supported by GRUB and should not be set on the
|
||||
+.Sy bootfs
|
||||
+filesystem when using GRUB to boot the system.
|
||||
Please see
|
||||
.Xr zpool-features 5
|
||||
for more information on these algorithms.
|
||||
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
|
||||
index f4f509a7..6516f646 100644
|
||||
--- a/module/zfs/zfs_ioctl.c
|
||||
+++ b/module/zfs/zfs_ioctl.c
|
||||
@@ -3985,16 +3985,7 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
|
||||
|
||||
if ((err = spa_open(dsname, &spa, FTAG)) != 0)
|
||||
return (err);
|
||||
- /*
|
||||
- * Salted checksums are not supported on root pools.
|
||||
- */
|
||||
- if (spa_bootfs(spa) != 0 &&
|
||||
- intval < ZIO_CHECKSUM_FUNCTIONS &&
|
||||
- (zio_checksum_table[intval].ci_flags &
|
||||
- ZCHECKSUM_FLAG_SALTED)) {
|
||||
- spa_close(spa, FTAG);
|
||||
- return (SET_ERROR(ERANGE));
|
||||
- }
|
||||
+
|
||||
if (!spa_feature_is_enabled(spa, feature)) {
|
||||
spa_close(spa, FTAG);
|
||||
return (SET_ERROR(ENOTSUP));
|
||||
@@ -1,108 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: LOLi <loli10K@users.noreply.github.com>
|
||||
Date: Tue, 1 May 2018 05:58:29 +0200
|
||||
Subject: [PATCH] Fix zfs incremental send remove '-o' properties
|
||||
|
||||
When receiving an incremental send stream with intermediary snapshots
|
||||
zfs_receive_one() does not correctly identify the top-level dataset:
|
||||
consequently we restore said snapshots as if they were children
|
||||
datasets in the hierarchy, forcing inheritance of any property received
|
||||
with 'zfs send -o' and effectively removing any locally set value.
|
||||
|
||||
The test case did not correctly verify this situation because it uses
|
||||
adjacent snapshots, basically testing 'zfs send -i' instead of
|
||||
'zfs send -I': this commit adds an additional intermediary snapshot to
|
||||
the test script.
|
||||
|
||||
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
|
||||
Closes #7478
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
lib/libzfs/libzfs_sendrecv.c | 2 +-
|
||||
.../zfs_receive/receive-o-x_props_override.ksh | 22 +++++++++++++---------
|
||||
2 files changed, 14 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
|
||||
index 5490581a..c5acd21a 100644
|
||||
--- a/lib/libzfs/libzfs_sendrecv.c
|
||||
+++ b/lib/libzfs/libzfs_sendrecv.c
|
||||
@@ -3592,7 +3592,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if (top_zfs && *top_zfs == NULL)
|
||||
+ if (top_zfs && (*top_zfs == NULL || strcmp(*top_zfs, name) == 0))
|
||||
toplevel = B_TRUE;
|
||||
if (drrb->drr_type == DMU_OST_ZVOL) {
|
||||
type = ZFS_TYPE_VOLUME;
|
||||
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/receive-o-x_props_override.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/receive-o-x_props_override.ksh
|
||||
index e4e69851..4e3a5393 100755
|
||||
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/receive-o-x_props_override.ksh
|
||||
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/receive-o-x_props_override.ksh
|
||||
@@ -212,16 +212,17 @@ log_must eval "zfs send -R $orig@snap1 > $streamfile_repl"
|
||||
log_must eval "zfs recv $dest < $streamfile_repl"
|
||||
# Fill the datasets with properties and create an incremental replication stream
|
||||
log_must zfs snapshot -r $orig@snap2
|
||||
+log_must zfs snapshot -r $orig@snap3
|
||||
log_must eval "zfs set copies=2 $orig"
|
||||
log_must eval "zfs set '$userprop:orig'='$userval' $orig"
|
||||
log_must eval "zfs set '$userprop:orig'='$userval' $origsub"
|
||||
log_must eval "zfs set '$userprop:snap'='$userval' $orig@snap1"
|
||||
-log_must eval "zfs set '$userprop:snap'='$userval' $origsub@snap2"
|
||||
-log_must eval "zfs send -R -I $orig@snap1 $orig@snap2 > $streamfile_incr"
|
||||
+log_must eval "zfs set '$userprop:snap'='$userval' $origsub@snap3"
|
||||
+log_must eval "zfs send -R -I $orig@snap1 $orig@snap3 > $streamfile_incr"
|
||||
# Sets various combination of override and exclude options
|
||||
log_must eval "zfs recv -F -o atime=off -o '$userprop:dest2'='$userval' "\
|
||||
"-o quota=123456789 -x compression -x '$userprop:orig' " \
|
||||
- "-x '$userprop:snap2' $dest < $streamfile_incr"
|
||||
+ "-x '$userprop:snap3' $dest < $streamfile_incr"
|
||||
# Verify we can correctly override and exclude properties
|
||||
log_must eval "check_prop_source $dest copies 2 received"
|
||||
log_must eval "check_prop_source $dest atime off local"
|
||||
@@ -237,9 +238,9 @@ log_must eval "check_prop_missing $destsub '$userprop:orig'"
|
||||
log_must eval "check_prop_source " \
|
||||
"$dest@snap1 '$userprop:snap' '$userval' received"
|
||||
log_must eval "check_prop_source " \
|
||||
- "$destsub@snap2 '$userprop:snap' '$userval' received"
|
||||
-log_must eval "check_prop_missing $dest@snap2 '$userprop:snap2'"
|
||||
-log_must eval "check_prop_missing $destsub@snap2 '$userprop:snap2'"
|
||||
+ "$destsub@snap3 '$userprop:snap' '$userval' received"
|
||||
+log_must eval "check_prop_missing $dest@snap3 '$userprop:snap3'"
|
||||
+log_must eval "check_prop_missing $destsub@snap3 '$userprop:snap3'"
|
||||
# Cleanup
|
||||
log_must zfs destroy -r -f $orig
|
||||
log_must zfs destroy -r -f $dest
|
||||
@@ -270,7 +271,8 @@ log_must eval "zfs set compression=gzip $dest"
|
||||
log_must eval "zfs set '$userprop:dest'='localval' $dest"
|
||||
# Receive the new stream, verify we preserve locally set properties
|
||||
log_must zfs snapshot -r $orig@snap2
|
||||
-log_must eval "zfs send -R -I $orig@snap1 $orig@snap2 > $streamfile_incr"
|
||||
+log_must zfs snapshot -r $orig@snap3
|
||||
+log_must eval "zfs send -R -I $orig@snap1 $orig@snap3 > $streamfile_incr"
|
||||
log_must eval "zfs recv -F -x copies -x compression -x '$userprop:orig' " \
|
||||
"-x '$userprop:dest' $dest < $streamfile_incr"
|
||||
log_must eval "check_prop_source $dest '$userprop:dest' 'localval' local"
|
||||
@@ -305,7 +307,8 @@ log_must eval "check_prop_source $destsub quota 0 default"
|
||||
log_must eval "zfs set quota=123456789 $dest"
|
||||
log_must eval "zfs set canmount=off $destsub"
|
||||
log_must zfs snapshot -r $orig@snap2
|
||||
-log_must eval "zfs send -R -I $orig@snap1 $orig@snap2 > $streamfile_incr"
|
||||
+log_must zfs snapshot -r $orig@snap3
|
||||
+log_must eval "zfs send -R -I $orig@snap1 $orig@snap3 > $streamfile_incr"
|
||||
log_must eval "zfs recv -F -x quota -x canmount $dest < $streamfile_incr"
|
||||
log_must eval "check_prop_source $dest quota 123456789 local"
|
||||
log_must eval "check_prop_source $destsub quota 0 default"
|
||||
@@ -332,7 +335,8 @@ log_must eval "zfs set '$userprop:origsub'='$userval' $destsub"
|
||||
mntpnt=$(get_prop mountpoint $orig)
|
||||
log_must eval "dd if=/dev/urandom of=$mntpnt/file bs=1024k count=10"
|
||||
log_must zfs snapshot -r $orig@snap2
|
||||
-log_must eval "zfs send -R -I $orig@snap1 $orig@snap2 > $streamfile_incr"
|
||||
+log_must zfs snapshot -r $orig@snap3
|
||||
+log_must eval "zfs send -R -I $orig@snap1 $orig@snap3 > $streamfile_incr"
|
||||
log_must eval "dd if=$streamfile_incr of=$streamfile_trun bs=1024k count=9"
|
||||
# Receive the truncated stream, verify original properties are kept
|
||||
log_mustnot eval "zfs recv -F -o copies=3 -o quota=987654321 "\
|
||||
@@ -1,95 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: LOLi <loli10K@users.noreply.github.com>
|
||||
Date: Fri, 3 Aug 2018 23:56:25 +0200
|
||||
Subject: [PATCH] Allow inherited properties in zfs_check_settable()
|
||||
|
||||
This change modifies how 'checksum' and 'dedup' properties are verified
|
||||
in zfs_check_settable() handling the case where they are explicitly
|
||||
inherited in the dataset hierarchy when receiving a recursive send
|
||||
stream.
|
||||
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Reviewed-by: Tom Caputi <tcaputi@datto.com>
|
||||
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
|
||||
Closes #7755
|
||||
Closes #7576
|
||||
Closes #7757
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
module/zfs/zfs_ioctl.c | 26 +++++++++++-----------
|
||||
.../zfs_receive/receive-o-x_props_override.ksh | 6 +++--
|
||||
2 files changed, 17 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
|
||||
index 6516f646..b8783e54 100644
|
||||
--- a/module/zfs/zfs_ioctl.c
|
||||
+++ b/module/zfs/zfs_ioctl.c
|
||||
@@ -3967,7 +3967,6 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
|
||||
{
|
||||
spa_feature_t feature;
|
||||
spa_t *spa;
|
||||
- uint64_t intval;
|
||||
int err;
|
||||
|
||||
/* dedup feature version checks */
|
||||
@@ -3975,22 +3974,23 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
|
||||
zfs_earlier_version(dsname, SPA_VERSION_DEDUP))
|
||||
return (SET_ERROR(ENOTSUP));
|
||||
|
||||
- if (nvpair_value_uint64(pair, &intval) != 0)
|
||||
- return (SET_ERROR(EINVAL));
|
||||
-
|
||||
- /* check prop value is enabled in features */
|
||||
- feature = zio_checksum_to_feature(intval & ZIO_CHECKSUM_MASK);
|
||||
- if (feature == SPA_FEATURE_NONE)
|
||||
- break;
|
||||
+ if (nvpair_type(pair) == DATA_TYPE_UINT64 &&
|
||||
+ nvpair_value_uint64(pair, &intval) == 0) {
|
||||
+ /* check prop value is enabled in features */
|
||||
+ feature = zio_checksum_to_feature(
|
||||
+ intval & ZIO_CHECKSUM_MASK);
|
||||
+ if (feature == SPA_FEATURE_NONE)
|
||||
+ break;
|
||||
|
||||
- if ((err = spa_open(dsname, &spa, FTAG)) != 0)
|
||||
- return (err);
|
||||
+ if ((err = spa_open(dsname, &spa, FTAG)) != 0)
|
||||
+ return (err);
|
||||
|
||||
- if (!spa_feature_is_enabled(spa, feature)) {
|
||||
+ if (!spa_feature_is_enabled(spa, feature)) {
|
||||
+ spa_close(spa, FTAG);
|
||||
+ return (SET_ERROR(ENOTSUP));
|
||||
+ }
|
||||
spa_close(spa, FTAG);
|
||||
- return (SET_ERROR(ENOTSUP));
|
||||
}
|
||||
- spa_close(spa, FTAG);
|
||||
break;
|
||||
}
|
||||
|
||||
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/receive-o-x_props_override.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/receive-o-x_props_override.ksh
|
||||
index 4e3a5393..583d8eb1 100755
|
||||
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/receive-o-x_props_override.ksh
|
||||
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/receive-o-x_props_override.ksh
|
||||
@@ -221,15 +221,17 @@ log_must eval "zfs set '$userprop:snap'='$userval' $origsub@snap3"
|
||||
log_must eval "zfs send -R -I $orig@snap1 $orig@snap3 > $streamfile_incr"
|
||||
# Sets various combination of override and exclude options
|
||||
log_must eval "zfs recv -F -o atime=off -o '$userprop:dest2'='$userval' "\
|
||||
- "-o quota=123456789 -x compression -x '$userprop:orig' " \
|
||||
- "-x '$userprop:snap3' $dest < $streamfile_incr"
|
||||
+ "-o quota=123456789 -o checksum=sha512 -x compression "\
|
||||
+ "-x '$userprop:orig' -x '$userprop:snap3' $dest < $streamfile_incr"
|
||||
# Verify we can correctly override and exclude properties
|
||||
log_must eval "check_prop_source $dest copies 2 received"
|
||||
log_must eval "check_prop_source $dest atime off local"
|
||||
log_must eval "check_prop_source $dest '$userprop:dest2' '$userval' local"
|
||||
log_must eval "check_prop_source $dest quota 123456789 local"
|
||||
+log_must eval "check_prop_source $dest checksum sha512 local"
|
||||
log_must eval "check_prop_inherit $destsub copies $dest"
|
||||
log_must eval "check_prop_inherit $destsub atime $dest"
|
||||
+log_must eval "check_prop_inherit $destsub checksum $dest"
|
||||
log_must eval "check_prop_inherit $destsub '$userprop:dest2' $dest"
|
||||
log_must eval "check_prop_source $destsub quota 0 default"
|
||||
log_must eval "check_prop_source $destsub compression off default"
|
||||
@@ -1,33 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: LOLi <loli10K@users.noreply.github.com>
|
||||
Date: Sat, 18 Aug 2018 22:10:36 +0200
|
||||
Subject: [PATCH] Fix arcstat.py handling of unsupported options
|
||||
|
||||
This change allows the arcstat.py script to handle unsupported options
|
||||
gracefully and print both error and usage messages when one such option
|
||||
is provided.
|
||||
|
||||
Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
|
||||
Reviewed-by: George Melikov <mail@gmelikov.ru>
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
|
||||
Closes #7799
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
cmd/arcstat/arcstat.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmd/arcstat/arcstat.py b/cmd/arcstat/arcstat.py
|
||||
index 85c83ccc..b52a8c29 100755
|
||||
--- a/cmd/arcstat/arcstat.py
|
||||
+++ b/cmd/arcstat/arcstat.py
|
||||
@@ -285,7 +285,7 @@ def init():
|
||||
]
|
||||
)
|
||||
except getopt.error as msg:
|
||||
- sys.stderr.write(msg)
|
||||
+ sys.stderr.write("Error: %s\n" % str(msg))
|
||||
usage()
|
||||
opts = None
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: DeHackEd <DeHackEd@users.noreply.github.com>
|
||||
Date: Mon, 20 Aug 2018 12:55:18 -0400
|
||||
Subject: [PATCH] Don't modify argv[] in user tools
|
||||
|
||||
argv[] gets modified during string parsing for input arguments. This
|
||||
is reflected in the live process listing. Don't do that.
|
||||
|
||||
Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com>
|
||||
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
|
||||
Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
|
||||
Reviewed-by: George Melikov <mail@gmelikov.ru>
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Signed-off-by: DHE <git@dehacked.net>
|
||||
Closes #7760
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
cmd/zfs/zfs_main.c | 18 ++++++++++++++++--
|
||||
cmd/zpool/zpool_main.c | 18 ++++++++++++++++--
|
||||
2 files changed, 32 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
|
||||
index f57df858..275d9c89 100644
|
||||
--- a/cmd/zfs/zfs_main.c
|
||||
+++ b/cmd/zfs/zfs_main.c
|
||||
@@ -7041,6 +7041,7 @@ main(int argc, char **argv)
|
||||
int ret = 0;
|
||||
int i = 0;
|
||||
char *cmdname;
|
||||
+ char **newargv;
|
||||
|
||||
(void) setlocale(LC_ALL, "");
|
||||
(void) textdomain(TEXT_DOMAIN);
|
||||
@@ -7096,16 +7097,25 @@ main(int argc, char **argv)
|
||||
libzfs_print_on_error(g_zfs, B_TRUE);
|
||||
|
||||
/*
|
||||
+ * Many commands modify input strings for string parsing reasons.
|
||||
+ * We create a copy to protect the original argv.
|
||||
+ */
|
||||
+ newargv = malloc((argc + 1) * sizeof (newargv[0]));
|
||||
+ for (i = 0; i < argc; i++)
|
||||
+ newargv[i] = strdup(argv[i]);
|
||||
+ newargv[argc] = NULL;
|
||||
+
|
||||
+ /*
|
||||
* Run the appropriate command.
|
||||
*/
|
||||
libzfs_mnttab_cache(g_zfs, B_TRUE);
|
||||
if (find_command_idx(cmdname, &i) == 0) {
|
||||
current_command = &command_table[i];
|
||||
- ret = command_table[i].func(argc - 1, argv + 1);
|
||||
+ ret = command_table[i].func(argc - 1, newargv + 1);
|
||||
} else if (strchr(cmdname, '=') != NULL) {
|
||||
verify(find_command_idx("set", &i) == 0);
|
||||
current_command = &command_table[i];
|
||||
- ret = command_table[i].func(argc, argv);
|
||||
+ ret = command_table[i].func(argc, newargv);
|
||||
} else {
|
||||
(void) fprintf(stderr, gettext("unrecognized "
|
||||
"command '%s'\n"), cmdname);
|
||||
@@ -7113,6 +7123,10 @@ main(int argc, char **argv)
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
+ for (i = 0; i < argc; i++)
|
||||
+ free(newargv[i]);
|
||||
+ free(newargv);
|
||||
+
|
||||
if (ret == 0 && log_history)
|
||||
(void) zpool_log_history(g_zfs, history_str);
|
||||
|
||||
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
|
||||
index 97697011..a4fd0321 100644
|
||||
--- a/cmd/zpool/zpool_main.c
|
||||
+++ b/cmd/zpool/zpool_main.c
|
||||
@@ -7971,6 +7971,7 @@ main(int argc, char **argv)
|
||||
int ret = 0;
|
||||
int i = 0;
|
||||
char *cmdname;
|
||||
+ char **newargv;
|
||||
|
||||
(void) setlocale(LC_ALL, "");
|
||||
(void) textdomain(TEXT_DOMAIN);
|
||||
@@ -8006,15 +8007,24 @@ main(int argc, char **argv)
|
||||
zfs_save_arguments(argc, argv, history_str, sizeof (history_str));
|
||||
|
||||
/*
|
||||
+ * Many commands modify input strings for string parsing reasons.
|
||||
+ * We create a copy to protect the original argv.
|
||||
+ */
|
||||
+ newargv = malloc((argc + 1) * sizeof (newargv[0]));
|
||||
+ for (i = 0; i < argc; i++)
|
||||
+ newargv[i] = strdup(argv[i]);
|
||||
+ newargv[argc] = NULL;
|
||||
+
|
||||
+ /*
|
||||
* Run the appropriate command.
|
||||
*/
|
||||
if (find_command_idx(cmdname, &i) == 0) {
|
||||
current_command = &command_table[i];
|
||||
- ret = command_table[i].func(argc - 1, argv + 1);
|
||||
+ ret = command_table[i].func(argc - 1, newargv + 1);
|
||||
} else if (strchr(cmdname, '=')) {
|
||||
verify(find_command_idx("set", &i) == 0);
|
||||
current_command = &command_table[i];
|
||||
- ret = command_table[i].func(argc, argv);
|
||||
+ ret = command_table[i].func(argc, newargv);
|
||||
} else if (strcmp(cmdname, "freeze") == 0 && argc == 3) {
|
||||
/*
|
||||
* 'freeze' is a vile debugging abomination, so we treat
|
||||
@@ -8031,6 +8041,10 @@ main(int argc, char **argv)
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
+ for (i = 0; i < argc; i++)
|
||||
+ free(newargv[i]);
|
||||
+ free(newargv);
|
||||
+
|
||||
if (ret == 0 && log_history)
|
||||
(void) zpool_log_history(g_zfs, history_str);
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Tue, 31 Jul 2018 10:17:44 -0700
|
||||
Subject: [PATCH] Add missing zfs-dracut RPM dependencies
|
||||
|
||||
The zfs-dracut package requires the hostid, basename, head, awk,
|
||||
and grep utilities be installed. The first three are provided by
|
||||
coreutils but additional dependencies are required for awk and grep.
|
||||
|
||||
Reviewed-by: Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
|
||||
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #7729
|
||||
Closes #7747
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
rpm/generic/zfs.spec.in | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in
|
||||
index 5b89db02..398221c6 100644
|
||||
--- a/rpm/generic/zfs.spec.in
|
||||
+++ b/rpm/generic/zfs.spec.in
|
||||
@@ -196,7 +196,7 @@ Requires: acl
|
||||
Requires: sudo
|
||||
Requires: sysstat
|
||||
Requires: rng-tools
|
||||
-Requires: libaio
|
||||
+Requires: libaio
|
||||
AutoReqProv: no
|
||||
|
||||
%description test
|
||||
@@ -208,6 +208,8 @@ Summary: Dracut module
|
||||
Group: System Environment/Kernel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: dracut
|
||||
+Requires: /usr/bin/awk
|
||||
+Requires: grep
|
||||
|
||||
%description dracut
|
||||
This package contains a dracut module used to construct an initramfs
|
||||
@@ -1,31 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Thu, 23 Aug 2018 09:34:34 -0700
|
||||
Subject: [PATCH] Add libaio-devel BuildRequires
|
||||
|
||||
The zfs-test package needs a build requirement on the libaio-devel
|
||||
package. Without it ./configure will correctly determine that
|
||||
mmap_libaio cannot be built and it will be skipped.
|
||||
|
||||
Reviewed-by: George Melikov <mail@gmelikov.ru>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #7821
|
||||
Closes #7824
|
||||
|
||||
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
||||
---
|
||||
rpm/generic/zfs.spec.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in
|
||||
index 398221c6..16c5780b 100644
|
||||
--- a/rpm/generic/zfs.spec.in
|
||||
+++ b/rpm/generic/zfs.spec.in
|
||||
@@ -197,6 +197,7 @@ Requires: sudo
|
||||
Requires: sysstat
|
||||
Requires: rng-tools
|
||||
Requires: libaio
|
||||
+BuildRequires: libaio-devel
|
||||
AutoReqProv: no
|
||||
|
||||
%description test
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user