diff options
author | Alek P <[email protected]> | 2019-03-12 13:13:22 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-03-12 13:13:22 -0700 |
commit | 4c0883fb4af0d5565459099b98fcf90ecbfa1ca1 (patch) | |
tree | 6f99d61588b8168485f903467b271259d00882ee /cmd/zfs/zfs_iter.c | |
parent | dd785b5b86bbb7ebbfe1d22668f3dd27c5704994 (diff) |
Avoid retrieving unused snapshot props
This patch modifies the zfs_ioc_snapshot_list_next() ioctl to enable it
to take input parameters that alter the way looping through the list of
snapshots is performed. The idea here is to restrict functions that
throw away some of the snapshots returned by the ioctl to a range of
snapshots that these functions actually use. This improves efficiency
and execution speed for some rollback and send operations.
Reviewed-by: Tom Caputi <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed by: Matt Ahrens <[email protected]>
Signed-off-by: Alek Pinchuk <[email protected]>
Closes #8077
Diffstat (limited to 'cmd/zfs/zfs_iter.c')
-rw-r--r-- | cmd/zfs/zfs_iter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zfs/zfs_iter.c b/cmd/zfs/zfs_iter.c index af4e4b4d2..9ad691938 100644 --- a/cmd/zfs/zfs_iter.c +++ b/cmd/zfs/zfs_iter.c @@ -140,7 +140,7 @@ zfs_callback(zfs_handle_t *zhp, void *data) ZFS_TYPE_BOOKMARK)) == 0) && include_snaps) (void) zfs_iter_snapshots(zhp, (cb->cb_flags & ZFS_ITER_SIMPLE) != 0, zfs_callback, - data); + data, 0, 0); if (((zfs_get_type(zhp) & (ZFS_TYPE_SNAPSHOT | ZFS_TYPE_BOOKMARK)) == 0) && include_bmarks) (void) zfs_iter_bookmarks(zhp, zfs_callback, data); |