From 305bc4b370b20de81eaf10a1cf724374258b74d1 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Wed, 10 May 2017 00:36:53 +0200 Subject: Make createtxg and guid properties public Document the existence of `createtxg` and `guid` native properties in man pages and zfs command output. One of the great features of ZFS is incremental replication of snapshots, possibly between pools on different machines. Shell scripts are commonly used to auomate this procedure. They have to find the most recent common snapshot between both sides and then perform incremental send & recv. Currently, scripts rely on the sorting order of `zfs list`, which defaults to `createtxg`, and the assumption that snapshot names on either side do not change. By making `createtxg` and `guid` part of the public ZFS interface, scripts are enabled to use a) `createtxg` to determine the logical & temporal order of snapshots (the creation property is not an equivalent substitute since multiple snapshots may be created within one second) b) `guid` to uniquely identify a snapshot, independent of its current display name This has the potential of making scripts safer and correct. Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Reviewed-by: DHE Reviewed-by: Richard Laager Signed-off-by: Christian Schwarz Closes #6102 --- include/sys/fs/zfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sys/fs/zfs.h') diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index ba6487612..5b7bbb689 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -113,7 +113,7 @@ typedef enum { ZFS_PROP_SNAPDIR, ZFS_PROP_PRIVATE, /* not exposed to user, temporary */ ZFS_PROP_ACLINHERIT, - ZFS_PROP_CREATETXG, /* not exposed to the user */ + ZFS_PROP_CREATETXG, ZFS_PROP_NAME, /* not exposed to the user */ ZFS_PROP_CANMOUNT, ZFS_PROP_ISCSIOPTIONS, /* not exposed to the user */ -- cgit v1.2.3