aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_ioctl.c
diff options
context:
space:
mode:
authorAmeer Hamza <[email protected]>2022-07-26 02:04:46 +0500
committerGitHub <[email protected]>2022-07-25 14:04:46 -0700
commit3a1ce4914172ce4c1e39123cd31b1e5245765a5e (patch)
treefe4a619ebd1ed65e02fb7931a09eb339232789fd /module/zfs/zfs_ioctl.c
parent8792dd24cd9599cf506d45bcaed3af78c8cd888d (diff)
Add createtxg sort support for simple snapshot iterator
- When iterating snapshots with name only, e.g., "-o name -s name", libzfs uses simple snapshot iterator and results are displayed in alphabetic order. This PR adds support for faster version of createtxg sort by avoiding nvlist parsing for properties. Flags "-o name -s createtxg" will enable createtxg sort while using simple snapshot iterator. - Added support to read createtxg property directly from zfs handle for filesystem, volume and snapshot types instead of parsing nvlist. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Ameer Hamza <[email protected]> Closes #13577
Diffstat (limited to 'module/zfs/zfs_ioctl.c')
-rw-r--r--module/zfs/zfs_ioctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index 0c4334550..571e55573 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -2322,6 +2322,8 @@ zfs_ioc_snapshot_list_next(zfs_cmd_t *zc)
}
if (zc->zc_simple) {
+ zc->zc_objset_stats.dds_creation_txg =
+ dsl_get_creationtxg(ds);
dsl_dataset_rele(ds, FTAG);
break;
}