mirror_zfs/lib/libzfs
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
..
os Vdev Properties Feature 2021-11-30 07:46:25 -07:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libzfs_changelist.c zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2021-12-16 11:56:22 -08:00
libzfs_config.c Use zfs_ioctl with zfs_cmd_t in libzfs 2019-10-23 17:29:43 -07:00
libzfs_crypto.c zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2021-12-16 11:56:22 -08:00
libzfs_dataset.c zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2021-12-16 11:56:22 -08:00
libzfs_diff.c libzfs: diff: simplify superfluous stdio 2021-12-13 15:50:38 -08:00
libzfs_impl.h zfs, libzfs: diff: accept -h/ZFS_DIFF_NO_MANGLE, disabling path escaping 2021-12-13 15:49:40 -08:00
libzfs_import.c libzfs: don't distribute libzfs_impl.h 2021-06-03 13:17:35 -07:00
libzfs_iter.c zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2021-12-16 11:56:22 -08:00
libzfs_mount.c zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2021-12-16 11:56:22 -08:00
libzfs_pool.c libzfs: zpool_set_vdev_prop: remove unused vprop 2021-12-13 15:50:09 -08:00
libzfs_sendrecv.c zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2021-12-16 11:56:22 -08:00
libzfs_status.c Improvements to the 'compatibility' property 2021-04-12 09:08:56 -07:00
libzfs_util.c Vdev Properties Feature 2021-11-30 07:46:25 -07:00
libzfs.abi zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2021-12-16 11:56:22 -08:00
libzfs.pc.in Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
libzfs.suppr Library ABI tracking with abigail 2020-11-17 09:18:52 -08:00
Makefile.am Simplify and document OpenZFS library dependencies 2021-10-07 11:31:26 -06:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00