]> git.proxmox.com Git - mirror_zfs.git/commit
Make createtxg and guid properties public
authorChristian Schwarz <me@cschwarz.com>
Tue, 9 May 2017 22:36:53 +0000 (00:36 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 9 May 2017 22:36:53 +0000 (15:36 -0700)
commit305bc4b370b20de81eaf10a1cf724374258b74d1
treec03a347aab95d2606b24faf389b0a9e842081dd6
parent78d95eaa732f074a6351045e59cd974380ad50ab
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 <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: DHE <git@dehacked.net>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Christian Schwarz <me@cschwarz.com>
Closes #6102
include/sys/fs/zfs.h
lib/libzfs/libzfs_dataset.c
man/man8/zfs.8
module/zcommon/zfs_prop.c