mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Introduce getting holds and listing bookmarks through ZCP
Consumers of ZFS Channel Programs can now list bookmarks, and get holds from datasets. A minor-refactoring was also applied to distinguish between user and system properties in ZCP. Reviewed-by: Paul Dagnelie <pcd@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Ahrens <mahrens@delphix.com> Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com> Ported-by: Serapheim Dimitropoulos <serapheim@delphix.com> Signed-off-by: Dan Kimmel <dan.kimmel@delphix.com> OpenZFS-issue: https://illumos.org/issues/8862 Closes #7902
This commit is contained in:
committed by
Brian Behlendorf
parent
2081db7982
commit
3b9edd7b17
@@ -741,6 +741,18 @@ function bkmarkexists
|
||||
return $?
|
||||
}
|
||||
|
||||
#
|
||||
# Return 0 if a hold exists; $? otherwise
|
||||
#
|
||||
# $1 - hold tag
|
||||
# $2 - snapshot name
|
||||
#
|
||||
function holdexists
|
||||
{
|
||||
zfs holds "$2" | awk '{ print $2 }' | grep "$1" > /dev/null 2>&1
|
||||
return $?
|
||||
}
|
||||
|
||||
#
|
||||
# Set a property to a certain value on a dataset.
|
||||
# Sets a property of the dataset to the value as passed in.
|
||||
|
||||
Reference in New Issue
Block a user