mirror_zfs/module
George Wilson 8e82ffba7b
pool may become suspended during device expansion
When expanding a device zfs needs to rescan the partition table to
get the correct size. This can only happen when we're in the kernel
and requires the device to be closed. As part of the rescan, udev is
notified and the device links are removed and recreated. This leave a
window where the vdev code may try to reopen the device before udev
has recreated the link. If that happens, then the pool may end up in
a suspended state.

To correct this, we leverage the BLKPG_RESIZE_PARTITION ioctl which
allows the partition information to be modified even while it's in use.
This ioctl also does not remove the device link associated with the zfs
data partition so it eliminates the race condition that can occur in
the kernel.

Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Wilson <gwilson@delphix.com>
Closes #10897
2020-09-17 20:03:10 -07:00
..
avl Links in Source Files 2020-09-02 09:42:12 -07:00
icp Prefix zfs internal endian checks with _ZFS 2020-07-28 13:02:49 -07:00
lua Mark lua setjmp/longjmp for powerpc weak 2020-08-25 10:32:49 -07:00
nvpair Links in Source Files 2020-09-02 09:42:12 -07:00
os pool may become suspended during device expansion 2020-09-17 20:03:10 -07:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode Prefix zfs internal endian checks with _ZFS 2020-07-28 13:02:49 -07:00
zcommon Rename acltype=posixacl to acltype=posix 2020-09-16 12:26:06 -07:00
zfs Fix stack frame size: dnode_dirty_l1range() 2020-09-15 15:55:55 -07:00
zstd module/zstd: pass -U__BMI__ 2020-08-27 15:50:13 -07:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00
Makefile.bsd module/zstd: pass -U__BMI__ 2020-08-27 15:50:13 -07:00
Makefile.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00