mirror_zfs/lib/libzfs
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
..
os pool may become suspended during device expansion 2020-09-17 20:03:10 -07:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libzfs_changelist.c Add 'zfs rename -u' to rename without remounting 2020-09-01 16:14:16 -07:00
libzfs_config.c Use zfs_ioctl with zfs_cmd_t in libzfs 2019-10-23 17:29:43 -07:00
libzfs_crypto.c Fix typos 2020-06-09 21:24:09 -07:00
libzfs_dataset.c Display pbkdf2iters property as plain number 2020-09-08 08:49:55 -07:00
libzfs_diff.c Don't open zfs control device exclusively 2020-02-28 14:54:14 -08:00
libzfs_import.c Persistent L2ARC 2020-04-10 10:33:35 -07:00
libzfs_iter.c Mark functions as static 2020-06-18 12:20:38 -07:00
libzfs_mount.c Remove dependency on sharetab file and refactor sharing logic 2020-07-13 09:19:18 -07:00
libzfs_pool.c zfs label bootenv should store data as nvlist 2020-09-15 15:42:27 -07:00
libzfs_sendrecv.c zpool: Change base URL for ZFS messages to openzfs-docs 2020-08-26 21:43:06 -07:00
libzfs_status.c Import vdev ashift optimization from FreeBSD 2020-08-21 12:53:17 -07:00
libzfs_util.c Don't assert on nvlists larger than SPA_MAXBLOCKSIZE 2020-08-25 11:04:20 -07:00
libzfs.pc.in Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
Makefile.am Disable -Wl,-z,defs for ASAN builds 2020-07-14 12:17:44 -07:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00