mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 18:11:00 +03:00
77e2756de0
Due to a possible lock inversion the zvol open call path on Linux needs to be able to retry in the case where the spa_namespace_lock cannot be acquired. For Linux 5.12 an older kernel this was accomplished by returning -ERESTARTSYS from zvol_open() to request that blkdev_get() drop the bdev->bd_mutex lock, reaquire it, then call the open callback again. However, as of the 5.13 kernel this behavior was removed. Therefore, for 5.12 and older kernels we preserved the existing retry logic, but for 5.13 and newer kernels we retry internally in zvol_open(). This should always succeed except in the case where a pool's vdev are layed on zvols, in which case it may fail. To handle this case vdev_disk_open() has been updated to retry when opening a device when -ERESTARTSYS is returned. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #12301 Closes #12759 |
||
---|---|---|
.. | ||
abd_os.c | ||
arc_os.c | ||
Makefile.in | ||
mmp_os.c | ||
policy.c | ||
qat_compress.c | ||
qat_crypt.c | ||
qat.c | ||
spa_misc_os.c | ||
trace.c | ||
vdev_disk.c | ||
vdev_file.c | ||
zfs_acl.c | ||
zfs_ctldir.c | ||
zfs_debug.c | ||
zfs_dir.c | ||
zfs_file_os.c | ||
zfs_ioctl_os.c | ||
zfs_racct.c | ||
zfs_sysfs.c | ||
zfs_uio.c | ||
zfs_vfsops.c | ||
zfs_vnops_os.c | ||
zfs_znode.c | ||
zio_crypt.c | ||
zpl_ctldir.c | ||
zpl_export.c | ||
zpl_file.c | ||
zpl_inode.c | ||
zpl_super.c | ||
zpl_xattr.c | ||
zvol_os.c |