zfs/cmd
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
..
raidz_test Fix multiplication converted to larger type 2022-10-28 09:30:37 -07:00
zdb zdb: Handle theoretical buffer overflow when printing float 2022-12-08 14:15:15 -08:00
zed Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names 2022-12-13 17:26:10 -08:00
zfs zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2022-12-13 17:27:54 -08:00
zinject Fix unsafe string operations 2022-09-27 16:47:24 -07:00
zpool zfs list: Allow more fields in ZFS_ITER_SIMPLE mode 2022-12-13 17:27:54 -08:00
zpool_influxdb Fix unchecked return values 2022-09-29 09:02:57 -07:00
zstream Address theoretical uninitialized variable usage in zstream 2022-12-12 10:40:05 -08:00
Makefile.am Add zilstat script to report zil kstats in a user friendly manner 2022-09-02 13:24:07 -07:00
arc_summary Remove ambiguity on demand vs prefetch stats reported by arc_summary 2022-10-04 11:00:02 -07:00
arcstat.in arcstat: fix -p option 2022-08-12 14:21:52 -07:00
dbufstat.in Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
fsck.zfs.in cmd: move single-file binaries up, extract udev programs to udev/ 2022-05-10 10:20:34 -07:00
mount_zfs.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_ids_to_path.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zgenhostid.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zhack.c Cleanup: zhack should not declare function prototypes in main() 2022-12-08 13:51:24 -08:00
zilstat.in Add zilstat script to report zil kstats in a user friendly manner 2022-09-02 13:24:07 -07:00
ztest.c ztest: comparisons against errno should not assign to it 2022-12-08 14:15:04 -08:00
zvol_wait zvol_wait logic may terminate prematurely 2022-10-11 12:12:04 -07:00