]> git.proxmox.com Git - mirror_zfs.git/commit
Improve performance for zpool trim on linux
authorUmer Saleem <usaleem@ixsystems.com>
Fri, 2 Feb 2024 19:51:51 +0000 (00:51 +0500)
committerGitHub <noreply@github.com>
Fri, 2 Feb 2024 19:51:51 +0000 (11:51 -0800)
commit06e25f9c4b0841e450e411bf270c7aa92c04c573
tree550fabad7a9e53634defd11d9511ab7e1d2b3cfc
parent2e6b3c4d9453360a351af6148386360a3a7209b3
Improve performance for zpool trim on linux

On Linux, ZFS uses blkdev_issue_discard in vdev_disk_io_trim to issue
trim command which is synchronous.

This commit updates vdev_disk_io_trim to use __blkdev_issue_discard,
which is asynchronous. Unfortunately there isn't any asynchronous
version for blkdev_issue_secure_erase, so performance of secure trim
will still suffer.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #15843
config/kernel-blkdev.m4
module/os/linux/zfs/vdev_disk.c