zfs/contrib
Allan Jude dc95911d21
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.

This was committed before (9a9e2e343d),
but was reverted due to a regression when used with an older kernel.

If the kernel does not populate zc->zc_objset_stats, we now fallback
to getting the properties via the slower interface, to avoid problems
with newer userland and older kernels.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes #14110
2022-12-13 17:27:54 -08:00
..
bash_completion.d Ubuntu 22.04 integration: ShellCheck 2022-11-18 11:24:48 -08:00
bpftrace Replace EXTRA_DIST with dist_noinst_DATA 2022-05-26 09:24:50 -07:00
coverity Coverity Model Update 2022-11-29 10:00:56 -08:00
debian Add native Debian Packaging for Linux 2022-10-27 15:38:45 -07:00
dracut Ubuntu 22.04 integration: ShellCheck 2022-11-18 11:24:48 -08:00
initramfs initramfs: Fix legacy mountpoint rootfs 2022-12-12 10:23:06 -08:00
intel_qat Add intel_QAT patches 2020-09-30 13:17:30 -07:00
pam_zfs_key zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2022-12-13 17:27:54 -08:00
pyzfs Enforce "-F" flag on resuming recv of full/newfs on existing dataset 2022-09-27 16:34:27 -07:00
zcp Replace EXTRA_DIST with dist_noinst_DATA 2022-05-26 09:24:50 -07:00
Makefile.am autoconf: use include directives instead of recursing down contrib 2022-05-10 10:19:44 -07:00