mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
zpool clear: remove undocumented rewind flags
Remove the -F, -n, and -X flags from zpool clear. These flags were inherited from OpenSolaris but are not applicable in this context. Unlike zpool import, where the pool is not yet loaded and a specific TXG can be selected, zpool clear operates on an already imported pool whose in-memory state is ahead of what is on disk. Rewinding transactions would require force-exporting the pool first. The rewind policy passed to zpool_clear() is now always ZPOOL_NO_REWIND. Tested on FreeBSD 16.0-CURRENT (amd64). Verified that -F, -n, and -X are properly rejected as invalid options and that the usage output reflects the change. Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Christos Longros <chris.longros@gmail.com> Closes #13825 Closes #18300
This commit is contained in:
@@ -4412,7 +4412,8 @@ zpool_clear(zpool_handle_t *zhp, const char *path, nvlist_t *rewindnvl)
|
||||
zc.zc_cookie = policy.zlp_rewind;
|
||||
|
||||
zcmd_alloc_dst_nvlist(hdl, &zc, zhp->zpool_config_size * 2);
|
||||
zcmd_write_src_nvlist(hdl, &zc, rewindnvl);
|
||||
if (rewindnvl != NULL)
|
||||
zcmd_write_src_nvlist(hdl, &zc, rewindnvl);
|
||||
|
||||
while ((error = zfs_ioctl(hdl, ZFS_IOC_CLEAR, &zc)) != 0 &&
|
||||
errno == ENOMEM)
|
||||
|
||||
Reference in New Issue
Block a user