mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Do not iterate through filesystems unnecessarily
Currently, when attempting to list snapshots ZFS may do a lot of extra work checking child datasets. This is because the code does not realize that it will not be able to reach any snapshots contained within snapshots that are at the depth limit since the snapshots of those datasets are counted as an additional layer deeper. This patch corrects this issue. In addition, this patch adds the ability to do perform the commands: $ zfs list -t snapshot <dataset> $ zfs get -t snapshot <prop> <dataset> as a convenient way to list out properties of all snapshots of a given dataset without having to use the depth limit. Reviewed-by: Alek Pinchuk <apinchuk@datto.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Matt Ahrens <mahrens@delphix.com> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes #8539
This commit is contained in:
committed by
Brian Behlendorf
parent
e03b25a564
commit
df583073eb
@@ -2594,7 +2594,6 @@ function verify_opt_p_ops
|
||||
"when ops is $ops."
|
||||
fi
|
||||
log_must datasetexists $dataset
|
||||
log_mustnot snapexists $dataset
|
||||
;;
|
||||
*)
|
||||
log_fail "$ops is not supported."
|
||||
|
||||
Reference in New Issue
Block a user