mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-07-15 04:07:40 +03:00
When multiple snapshots prevent the destruction/rollback of the
respective dataset/snapshot/volume via zfs destroy or zfs rollback,
the error message does not list the blocking snapshots sorted
according to their order of creation. This causes inconvenience and can
lead to confusion, and also creates a contrast with a returned message
from zfs list -t snap function.
Closes: #12751
Signed-off-by: Artem-OSSRevival <artem.vlasenko@ossrevival.org>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
(cherry picked from commit 27f3d94940
)
This commit is contained in:
parent
edae295af9
commit
ad63ab2d90
@ -4440,7 +4440,7 @@ zfs_do_rollback(int argc, char **argv)
|
||||
if (cb.cb_create > 0)
|
||||
min_txg = cb.cb_create;
|
||||
|
||||
if ((ret = zfs_iter_snapshots_v2(zhp, 0, rollback_check, &cb,
|
||||
if ((ret = zfs_iter_snapshots_sorted_v2(zhp, 0, rollback_check, &cb,
|
||||
min_txg, 0)) != 0)
|
||||
goto out;
|
||||
if ((ret = zfs_iter_bookmarks_v2(zhp, 0, rollback_check, &cb)) != 0)
|
||||
|
@ -570,7 +570,7 @@ iter_dependents_cb(zfs_handle_t *zhp, void *arg)
|
||||
err = zfs_iter_filesystems_v2(zhp, ida->flags,
|
||||
iter_dependents_cb, ida);
|
||||
if (err == 0)
|
||||
err = zfs_iter_snapshots_v2(zhp, ida->flags,
|
||||
err = zfs_iter_snapshots_sorted_v2(zhp, ida->flags,
|
||||
iter_dependents_cb, ida, 0, 0);
|
||||
ida->stack = isf.next;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user