zfs/lib
наб eb51a9d747
zcommon: pre-iterate over sysfs instead of statting every feature
If sufficient memory (<2K, realistically) is available, libzfs_init()
can be significantly shorted by iterating over the correct sysfs
directory before registrations, we can turn 168 stats into 15/18
syscalls (3 opens (6 if built in), 3 fstats, 6 getdentses, and 3
closes), a tenfoldish reduction; this is probably a bit faster, too.

The list is always optional, and registration functions (and one-off
users) can simply pass NULL, which will fall back to the previous
mechanism

Also, don't allocate in zfs_mod_supported_impl, and use use access()
instead of stat(), since existence is really what we care about

Also, fix pre-prop-checking compat in fallback for built-in ZFS

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12089
2021-12-16 16:43:10 -08:00
..
libavl lib{efi,avl,share,tpool,zfs_core,zfsbootenv,zutil}: -fvisibility=hidden 2021-06-09 17:04:32 -07:00
libefi lib{efi,avl,share,tpool,zfs_core,zfsbootenv,zutil}: -fvisibility=hidden 2021-06-09 17:04:32 -07:00
libicp cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libnvpair Add `const` to nvlist functions to properly expose their real behavior 2021-12-06 18:19:13 -07:00
libshare libshare: nfs: pass through ipv6 addresses in bracket notation 2021-10-20 10:40:00 -07:00
libspl linux: libspl: getmntany: remove unused argument 2021-12-13 15:49:59 -08:00
libtpool lib{efi,avl,share,tpool,zfs_core,zfsbootenv,zutil}: -fvisibility=hidden 2021-06-09 17:04:32 -07:00
libunicode cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libuutil Add `const` to nvlist functions to properly expose their real behavior 2021-12-06 18:19:13 -07:00
libzfs zcommon: pre-iterate over sysfs instead of statting every feature 2021-12-16 16:43:10 -08:00
libzfs_core Add `const` to nvlist functions to properly expose their real behavior 2021-12-06 18:19:13 -07:00
libzfsbootenv Add `const` to nvlist functions to properly expose their real behavior 2021-12-06 18:19:13 -07:00
libzpool Code cleanups 2021-11-30 10:32:38 -08:00
libzstd cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libzutil Add `const` to nvlist functions to properly expose their real behavior 2021-12-06 18:19:13 -07:00
Makefile.am Simplify and document OpenZFS library dependencies 2021-10-07 11:31:26 -06:00