From 9681de4657686d0ed19ca18d578513e74395f00f Mon Sep 17 00:00:00 2001 From: Umer Saleem Date: Wed, 3 Aug 2022 04:45:30 +0500 Subject: Add snapshots_changed as property Make dd_snap_cmtime property persistent across mount and unmount operations by storing in ZAP and restore the value from ZAP on hold into dd_snap_cmtime instead of updating it. Expose dd_snap_cmtime as 'snapshots_changed' property that provides a mechanism to quickly determine whether snapshot list for dataset has changed without having to mount a dataset or iterate the snapshot list. It specifies the time at which a snapshot for a dataset was last created or deleted. This allows us to be more efficient how often we query snapshots. Reviewed-by: Ryan Moeller Reviewed-by: Alexander Motin Reviewed-by: Brian Behlendorf Signed-off-by: Umer Saleem Closes #13635 --- include/sys/fs/zfs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sys/fs') diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index 237b50362..8cbd0e602 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -189,6 +189,7 @@ typedef enum { ZFS_PROP_IVSET_GUID, /* not exposed to the user */ ZFS_PROP_REDACTED, ZFS_PROP_REDACT_SNAPS, + ZFS_PROP_SNAPSHOTS_CHANGED, ZFS_NUM_PROPS } zfs_prop_t; -- cgit v1.2.3