mirror_zfs/lib
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
..
libavl Fixes for make dist 2020-06-26 14:20:02 -07:00
libefi pool may become suspended during device expansion 2020-09-17 20:03:10 -07:00
libicp Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libnvpair Disable -Wl,-z,defs for ASAN builds 2020-07-14 12:17:44 -07:00
libshare libshare: Add missing headers for nfs.c 2020-09-04 12:03:57 -07:00
libspl Fixes for running FreeBSD buildworld on Linux/macOS hosts 2020-09-03 20:06:03 -07:00
libtpool Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libunicode Fixes for make dist 2020-06-26 14:20:02 -07:00
libuutil Disable -Wl,-z,defs for ASAN builds 2020-07-14 12:17:44 -07:00
libzfs pool may become suspended during device expansion 2020-09-17 20:03:10 -07:00
libzfs_core zfs label bootenv should store data as nvlist 2020-09-15 15:42:27 -07:00
libzfsbootenv libzfsbootenv: lzbe_nvlist_set needs to store bootenv version VB_NVLIST 2020-09-17 10:51:09 -07:00
libzpool zfs label bootenv should store data as nvlist 2020-09-15 15:42:27 -07:00
libzstd Avoid symbol collision with in-kernel zstdlib 2020-08-24 12:20:41 -07:00
libzutil libzutil depends on libnvpair 2020-09-12 08:19:48 -07:00
Makefile.am zfs label bootenv should store data as nvlist 2020-09-15 15:42:27 -07:00