summaryrefslogtreecommitdiffstats
path: root/include/libzfs.h
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <[email protected]>2012-05-29 10:50:50 -0700
committerBrian Behlendorf <[email protected]>2012-06-14 09:49:04 -0700
commit0cee24064a79f9c01fc4521543c37acea538405f (patch)
treecc7429b7bc14f057aade9bea66a72a39e6a5a23c /include/libzfs.h
parent74497b7ab6af69434453e03c755d3f6e6e655aee (diff)
Speed up 'zfs list -t snapshot -o name -s name'
FreeBSD #xxx: Dramatically optimize listing snapshots when user requests only snapshot names and wants to sort them by name, ie. when executes: # zfs list -t snapshot -o name -s name Because only name is needed we don't have to read all snapshot properties. Below you can find how long does it take to list 34509 snapshots from a single disk pool before and after this change with cold and warm cache: before: # time zfs list -t snapshot -o name -s name > /dev/null cold cache: 525s warm cache: 218s after: # time zfs list -t snapshot -o name -s name > /dev/null cold cache: 1.7s warm cache: 1.1s NOTE: This patch only appears in FreeBSD. If/when Illumos picks up the change we may want to drop this patch and adopt their version. However, for now this addresses a real issue. Ported-by: Brian Behlendorf <[email protected]> Issue #450
Diffstat (limited to 'include/libzfs.h')
-rw-r--r--include/libzfs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libzfs.h b/include/libzfs.h
index 26b1ce302..86e23ac32 100644
--- a/include/libzfs.h
+++ b/include/libzfs.h
@@ -516,7 +516,7 @@ extern int zfs_iter_root(libzfs_handle_t *, zfs_iter_f, void *);
extern int zfs_iter_children(zfs_handle_t *, zfs_iter_f, void *);
extern int zfs_iter_dependents(zfs_handle_t *, boolean_t, zfs_iter_f, void *);
extern int zfs_iter_filesystems(zfs_handle_t *, zfs_iter_f, void *);
-extern int zfs_iter_snapshots(zfs_handle_t *, zfs_iter_f, void *);
+extern int zfs_iter_snapshots(zfs_handle_t *, boolean_t, zfs_iter_f, void *);
extern int zfs_iter_snapshots_sorted(zfs_handle_t *, zfs_iter_f, void *);
typedef struct get_all_cb {