freebsd-dev/cmd/zfs
Allan Jude f6a0dac84a
zfs list: Allow more fields in ZFS_ITER_SIMPLE mode
If the fields to be listed and sorted by are constrained
to those populated by dsl_dataset_fast_stat(), then
zfs list is much faster, as it does not need to open each
objset and reads its properties.

A previous optimization by Pawel Dawidek
(0cee24064a) took advantage
of this to make listing snapshot names sorted only by name
much faster.

However, it was limited to `-o name -s name`, this work
extends this optimization to work with:
  - name
  - guid
  - createtxg
  - numclones
  - inconsistent
  - redacted
  - origin
and could be further extended to any other properties
supported by dsl_dataset_fast_stat() or similar, that do
not require extra locking or reading from disk.

Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes #11080
2021-12-16 11:56:22 -08:00
..
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
zfs_iter.c zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2021-12-16 11:56:22 -08:00
zfs_iter.h zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2021-12-16 11:56:22 -08:00
zfs_main.c zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2021-12-16 11:56:22 -08:00
zfs_project.c Misc fixes and cleanup for project quota 2018-03-05 12:56:27 -08:00
zfs_projectutil.h Project Quota on ZFS 2018-02-13 14:54:54 -08:00
zfs_util.h Fix static data to link with -fno-common 2020-02-06 09:25:29 -08:00