mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
zfs get: don't lookup mount options when using "-s local"
Looking up mount options can be very expensive on servers with many mounted file systems. When doing "zfs get" with any "-s" option that does not include "temporary", the mount list will never be used. This commit optimizes for that case. This is a breaking commit for libzfs! Callers of zfs_get_prop are now required to initialize src. To preserve existing behavior, they should initialize it to ZPROP_SRC_NONE. Sponsored by: Axcient Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alan Somers <asomers@gmail.com> Closes #11955
This commit is contained in:
@@ -575,7 +575,7 @@ get_snapshot_names(differ_info_t *di, const char *fromsnap,
|
||||
* tosnap is a clone of a fromsnap descendant.
|
||||
*/
|
||||
char origin[ZFS_MAX_DATASET_NAME_LEN];
|
||||
zprop_source_t src;
|
||||
zprop_source_t src = ZPROP_SRC_NONE;
|
||||
zfs_handle_t *zhp;
|
||||
|
||||
di->ds = zfs_alloc(di->zhp->zfs_hdl, tdslen + 1);
|
||||
|
||||
Reference in New Issue
Block a user