Package: zfs-linux / 2.0.3-9+deb11u1

Metadata

Package Version Patches format
zfs-linux 2.0.3-9+deb11u1 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
1000 dont symlink zed scripts.patch | (download)

cmd/zed/zed.d/Makefile.am | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 track default symlinks, instead of symlinking
1001 Prevent manual builds in the DKMS source.patch | (download)

config/dkms.m4 | 14 14 + 0 - 0 !
config/user.m4 | 1 1 + 0 - 0 !
2 files changed, 15 insertions(+)

 block manual building in the dkms source tree.
  To avoid messing up future DKMS builds and the zfs installation,
  block manual building of the DKMS source tree.
1002 Check for META and DCH consistency in autoconf.patch | (download)

config/zfs-meta.m4 | 33 28 + 5 - 0 !
1 file changed, 28 insertions(+), 5 deletions(-)

 check for meta and dch consistency in autoconf
1003 relocate zvol_wait.patch | (download)

etc/systemd/system/zfs-volume-wait.service.in | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 relocate the executable path
1004 prefer python3 tests.patch | (download)

tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh | 6 3 + 3 - 0 !
tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh | 2 1 + 1 - 0 !
tests/zfs-tests/tests/functional/rsend/send_realloc_dnode_size.ksh | 2 1 + 1 - 0 !
3 files changed, 5 insertions(+), 5 deletions(-)

---
1005 enable zed.patch | (download)

cmd/zed/zed.d/zed.rc | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 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.
1006 zed service bindir.patch | (download)

etc/systemd/system/zfs-zed.service.in | 2 1 + 1 - 0 !
etc/zfs/zfs-functions.in | 2 1 + 1 - 0 !
2 files changed, 2 insertions(+), 2 deletions(-)

 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.
2100 zfs load module.patch | (download)

contrib/dracut/90zfs/module-setup.sh.in | 1 1 + 0 - 0 !
etc/systemd/system/50-zfs.preset.in | 1 1 + 0 - 0 !
etc/systemd/system/Makefile.am | 1 1 + 0 - 0 !
etc/systemd/system/zfs-import-cache.service.in | 2 2 + 0 - 0 !
etc/systemd/system/zfs-import-scan.service.in | 2 2 + 0 - 0 !
etc/systemd/system/zfs-load-module.service.in | 17 17 + 0 - 0 !
6 files changed, 24 insertions(+)

 explicitly load the zfs module via systemd service
3100 remove libzfs module timeout.patch | (download)

lib/libzfs/os/linux/libzfs_util_os.c | 9 9 + 0 - 0 !
1 file changed, 9 insertions(+)

---
force verbose rules.patch | (download)

config/Rules.am | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 force libtool to produce verbose output
4620 zfs vol wait fix locked encrypted vols.patch | (download)

cmd/zvol_wait/zvol_wait | 10 9 + 1 - 0 !
1 file changed, 9 insertions(+), 1 deletion(-)

 don't wait for links when volume has property keystatus=unavailable
  zfs-volume-wait.service systemd unit does not start if the encrypted
  zvol is locked. The /sbin/zvol_wait should not wait for links when the
  volume has property keystatus=unavailable. This patch fixes this issue
Bug: https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1888405
move arcstat 1 to 8.patch | (download)

man/man1/Makefile.am | 2 1 + 1 - 0 !
man/man1/arcstat.1 | 520 0 + 520 - 0 !
man/man8/Makefile.am | 1 1 + 0 - 0 !
man/man8/arcstat.8 | 520 520 + 0 - 0 !
4 files changed, 522 insertions(+), 521 deletions(-)

---
0010 Fix report_mount_progress never calling set_progress.patch | (download)

cmd/zfs/zfs_main.c | 3 0 + 3 - 0 !
1 file changed, 3 deletions(-)

 [patch 10/38] fix report_mount_progress never calling
 set_progress_header

That happens because of an off-by-one mistake.
share_mount_one_cb() calls report_mount_progress(current=sm_done) after
having incremented sm_done by one.  Then report_mount_progress()
increments the parameter again.  It appears that that logic became
obsolete after commit a10d50f999511, parallel zfs mount.

On FreeBSD I observe that zfs mount -a -v prints, for example,
    (null): (201/248)
That happens because set_progress_header() is never called.

With this change the output becomes correct:
    Mounting ZFS filesystems: (209/248)

0014 libzpool set_global_var fix endianness handling fixe.patch | (download)

lib/libzpool/util.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch 14/38] libzpool: set_global_var: fix endianness handling
 (fixes zdb -o )

Without this patch I get the error

  Setting global variables is only supported on little-endian systems

when using `zdb -o` on my amd64 machine.

0019 Better zfs_get_enclosure_sysfs_path enclosure suppor.patch | (download)

lib/libzutil/os/linux/zutil_device_path_os.c | 252 142 + 110 - 0 !
1 file changed, 142 insertions(+), 110 deletions(-)

 [patch 19/38] better zfs_get_enclosure_sysfs_path() enclosure support

A multpathed disk will have several 'underlying' paths to the disk.  For
example, multipath disk 'dm-0' may be made up of paths:
/dev/{sda,sdb,sdc,sdd}.  On many enclosures those underlying sysfs
paths will have a symlink back to their enclosure device entry
(like 'enclosure_device0/slot1').  This is used by the
statechange-led.sh script to set/clear the fault LED for a disk, and
by 'zpool status -c'.

However, on some enclosures, those underlying paths may not all have
symlinks back to the enclosure device.  Maybe only two out of four
of them might.

This patch updates zfs_get_enclosure_sysfs_path() to favor returning
paths that have symlinks back to their enclosure devices, rather
than just returning the first path.

0020 vdev_ops don t try to call vdev_op_hold or vdev_op_r.patch | (download)

module/zfs/vdev.c | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 [patch 20/38] vdev_ops: don't try to call vdev_op_hold or
 vdev_op_rele when NULL

This prevents a panic after a SLOG add/removal on the root pool followed
by a zpool scrub.

When a SLOG is removed, a hole takes its place - the vdev_ops for a hole
is vdev_hole_ops, which defines the handler functions of vdev_op_hold
and vdev_op_rele as NULL.

0026 Linux increase max nvlist_src size.patch | (download)

man/man5/zfs-module-parameters.5 | 2 1 + 1 - 0 !
module/os/linux/zfs/zfs_ioctl_os.c | 2 1 + 1 - 0 !
2 files changed, 2 insertions(+), 2 deletions(-)

 [patch 26/38] linux: increase max nvlist_src size

On Linux increase the maximum allowed size of the src nvlist which
can be passed to the /dev/zfs ioctl.  Originally, this was set
to a maximum of KMALLOC_MAX_SIZE (4M) because it was kmalloc'd.
Since that time it's been converted to a vmalloc so that's no
longer a hard limit, and it's desirable for `zfs send/recv` to
allow larger nvlists so more snapshots can be sent at once.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6572
Closes #11638

0028 Fix overly broad locking in spa_vdev_config_exit.patch | (download)

module/zfs/spa_misc.c | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 [patch 28/38] fix overly broad locking in spa_vdev_config_exit()

Calling vdev_free() only requires the we acquire the spa config
SCL_STATE_ALL locks, not the SCL_ALL locks.  In particular, we need
need to avoid taking the SCL_CONFIG lock (included in SCL_ALL) as a
writer since this can lead to a deadlock.  The txg_sync_thread() may
block in spa_txg_history_init_io() when taking the SCL_CONFIG lock
as a reading when it detects there's a pending writer.

0035 Cancel TRIM initialize on FAULTED non writeable vdev.patch | (download)

module/zfs/vdev_initialize.c | 10 8 + 2 - 0 !
module/zfs/vdev_trim.c | 15 11 + 4 - 0 !
tests/runfiles/common.run | 2 2 + 0 - 0 !
tests/zfs-tests/tests/functional/cli_root/zpool_initialize/Makefile.am | 1 1 + 0 - 0 !
tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_fault_export_import_online.ksh | 59 59 + 0 - 0 !
tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am | 1 1 + 0 - 0 !
tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_fault_export_import_online.ksh | 62 62 + 0 - 0 !
7 files changed, 144 insertions(+), 6 deletions(-)

 [patch 35/38] cancel trim / initialize on faulted non-writeable vdevs

When a device which is actively trimming or initializing becomes
FAULTED, and therefore no longer writable, cancel the active
TRIM or initialization.  When the device is merely taken offline
with `zpool offline` then stop the operation but do not cancel it.
When the device is brought back online the operation will be
resumed if possible.

0037 linux zvol avoid heap allocation for zvol_request_sy.patch | (download)

module/os/linux/zfs/zvol_os.c | 93 64 + 29 - 0 !
1 file changed, 64 insertions(+), 29 deletions(-)

 [patch 37/38] linux: zvol: avoid heap allocation for
 zvol_request_sync=1

The spl_kmem_alloc showed up in some flamegraphs in a single-threaded
4k sync write workload at 85k IOPS on an
Intel(R) Xeon(R) Silver 4215 CPU @ 2.50GHz.
Certainly not a huge win but I believe the change is clean and
easy to maintain down the road.

0038 Don t bomb out when using keylocation file.patch | (download)

lib/libzfs/libzfs_crypto.c | 10 7 + 3 - 0 !
1 file changed, 7 insertions(+), 3 deletions(-)

 [patch 38/38] don't bomb out when using keylocation=file://

Avoid following the error path when the operation in fact succeeded.

0001 Remove iov_iter_advance for iter_write.patch | (download)

module/os/linux/zfs/zpl_file.c | 3 0 + 3 - 0 !
1 file changed, 3 deletions(-)

 [patch] remove iov_iter_advance() for iter_write

The additional iter advance is incorrect, as copy_from_iter() has
already done the right thing.  This will result in the following
warning being printed to the console as of the 5.12 kernel.

    Attempted to advance past end of bvec iter

This change should have been included with #11378 when a
similar change was made on the read side.

Suggested-by: @siebenmann
0002 Initialize ZIL buffers.patch | (download)

module/os/linux/zfs/zio_crypt.c | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 [patch] initialize zil buffers

When populating a ZIL destination buffer ensure it is always
zeroed before its contents are constructed.

0003 Fix crash in zio_done error reporting.patch | (download)

module/zfs/zio.c | 5 3 + 2 - 0 !
1 file changed, 3 insertions(+), 2 deletions(-)

 [patch] fix crash in zio_done error reporting

Fix NULL pointer dereference when reporting
checksum error for gang block in zio_done.

0004 Fix AVX512BW Fletcher code on AVX512 but not BW mach.patch | (download)

module/zcommon/zfs_fletcher_avx512.c | 8 7 + 1 - 0 !
1 file changed, 7 insertions(+), 1 deletion(-)

 [patch] fix avx512bw fletcher code on avx512-but-not-bw machines

Introduce a specific valid function for avx512f+avx512bw (instead
of checking only for avx512f).

0005 Fix zfs_get_data access to files with wrong generati.patch | (download)

cmd/ztest/ztest.c | 4 2 + 2 - 0 !
include/sys/zil.h | 3 2 + 1 - 0 !
include/sys/zvol_impl.h | 4 2 + 2 - 0 !
module/os/linux/zfs/zfs_vnops_os.c | 14 13 + 1 - 0 !
module/zfs/zfs_log.c | 5 5 + 0 - 0 !
module/zfs/zil.c | 3 2 + 1 - 0 !
module/zfs/zvol.c | 3 2 + 1 - 0 !
7 files changed, 28 insertions(+), 8 deletions(-)

 [patch] fix zfs_get_data access to files with wrong generation

If TX_WRITE is create on a file, and the file is later deleted and a new
directory is created on the same object id, it is possible that when
zil_commit happens, zfs_get_data will be called on the new directory.
This may result in panic as it tries to do range lock.

This patch fixes this issue by record the generation number during
zfs_log_write, so zfs_get_data can check if the object is valid.

0006 Linux always check or verify return of igrab.patch | (download)

include/os/linux/zfs/sys/zfs_znode_impl.h | 8 7 + 1 - 0 !
module/os/linux/zfs/zfs_ctldir.c | 3 2 + 1 - 0 !
module/os/linux/zfs/zfs_vfsops.c | 6 5 + 1 - 0 !
module/os/linux/zfs/zpl_inode.c | 3 2 + 1 - 0 !
4 files changed, 16 insertions(+), 4 deletions(-)

 [patch] linux: always check or verify return of igrab()

zhold() wraps igrab() on Linux, and igrab() may fail when the inode
is in the process of being deleted.  This means zhold() must only be
called when a reference exists and therefore it cannot be deleted.
This is the case for all existing consumers so add a VERIFY and a
comment explaining this requirement.

0007 Avoid deadlock when removing L2ARC devices under I O.patch | (download)

module/zfs/arc.c | 17 6 + 11 - 0 !
module/zfs/zio.c | 3 0 + 3 - 0 !
2 files changed, 6 insertions(+), 14 deletions(-)

 [patch] avoid deadlock when removing l2arc devices under i/o

In case we have I/O and try to remove an L2ARC device a deadlock might
occur. arc_read()->zio_read()->zfs_blkptr_verify() waits for SCL_VDEV
to be dropped while holding the hash_lock. However, spa_l2cache_load()
holds SCL_ALL and waits for the hash_lock in l2arc_evict().

Fix this by moving zfs_blkptr_verify() to the top top arc_read() before
the hash_lock is taken. Verify the block pointer and return a checksum
error if damaged rather than halting the system, by using
BLK_VERIFY_LOG instead of BLK_VERIFY_HALT.

0008 file reference counts can get corrupted.patch | (download)

include/sys/fm/util.h | 5 3 + 2 - 0 !
include/sys/zfs_file.h | 6 4 + 2 - 0 !
include/sys/zfs_ioctl.h | 2 1 + 1 - 0 !
include/sys/zfs_onexit.h | 4 2 + 2 - 0 !
lib/libzpool/kernel.c | 20 9 + 11 - 0 !
module/os/freebsd/zfs/zfs_file_os.c | 19 6 + 13 - 0 !
module/os/linux/zfs/zfs_file_os.c | 28 7 + 21 - 0 !
module/zfs/fm.c | 20 12 + 8 - 0 !
module/zfs/zfs_ioctl.c | 71 34 + 37 - 0 !
module/zfs/zfs_onexit.c | 23 13 + 10 - 0 !
10 files changed, 91 insertions(+), 107 deletions(-)

 [patch] file reference counts can get corrupted

Callers of zfs_file_get and zfs_file_put can corrupt the reference
counts for the file structure resulting in a panic or a soft lockup.
When zfs send/recv runs, it will add a reference count to the
open file, and begin to send or recv the stream. If the file descriptor
is closed, then when dmu_recv_stream() or dmu_send() return we will
call zfs_file_put to remove the reference we placed on the file
structure. Unfortunately, because zfs_file_put() uses the file
descriptor to lookup the file structure, it may end up finding that
the file descriptor table no longer contains the file struct, thus
leaking the file structure. Or it might end up finding a file
0009 libshare nfs don t leak nfs_lock_fd when lock fails.patch | (download)

lib/libshare/os/freebsd/nfs.c | 13 9 + 4 - 0 !
lib/libshare/os/linux/nfs.c | 13 9 + 4 - 0 !
2 files changed, 18 insertions(+), 8 deletions(-)

 [patch] libshare: nfs: don't leak nfs_lock_fd when lock fails
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

0010 Fix plymouth passphrase prompt with dracut.patch | (download)

contrib/dracut/90zfs/zfs-lib.sh.in | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 [patch] fix plymouth passphrase prompt with dracut

plymouth --command splits the command on spaces which means
that zfs-load-key was getting the filesystem name enclosed
in single quotes (since 13c59bb76) and failing. This commit
fixes it by piping the password directly to the command
similar to how it's done in other scripts (initramfs,
dracut without plymouth).