mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 18:11:00 +03:00
066da71e7f
1) As implemented the `zpool labelclear` command overwrites the calculated offsets of all four vdev labels even when only a single valid label is found. If the device as been re-purposed but still contains a valid label this can result in space no longer owned by ZFS being zeroed. Prevent this by verifying every label removed is intact before it's overwritten. 2) Address a small bug in zpool_do_labelclear() which prevented labelclear from working on file vdevs. Only block devices support BLKFLSBUF, try the ioctl() but when it's reported as unsupported this should not be fatal. 3) Fix `zpool labelclear` so it can be run on vdevs which were removed from the pool with `zpool remove`. Additionally, allow intact but partial labels to be cleared as in the case of a failed `zpool attach` or `zpool replace`. 4) Remove LABELCLEAR and LABELREAD variables for test cases. Reviewed-by: Matt Ahrens <mahrens@delphix.com> Reviewed-by: Tim Chase <tim@chase2k.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #8500 Closes #8373 Closes #6261 |
||
---|---|---|
.. | ||
.gitignore | ||
libzfs_changelist.c | ||
libzfs_config.c | ||
libzfs_core.pc.in | ||
libzfs_crypto.c | ||
libzfs_dataset.c | ||
libzfs_diff.c | ||
libzfs_import.c | ||
libzfs_iter.c | ||
libzfs_mount.c | ||
libzfs_pool.c | ||
libzfs_sendrecv.c | ||
libzfs_status.c | ||
libzfs_util.c | ||
libzfs.pc.in | ||
Makefile.am | ||
THIRDPARTYLICENSE.openssl | ||
THIRDPARTYLICENSE.openssl.descrip |