HomeFreeBSD

Skip iterating over snapshots for share properties

Description

Skip iterating over snapshots for share properties

Setting sharenfs and sharesmb properties on a dataset can become costly
if there are large number of snapshots, since setting the share
properties iterates over all snapshots present for a dataset. If it is
the root dataset for which we are trying to set the share property,
snapshots for all child datasets and their children will also be
iterated.

There is no need to iterate over snapshots for share properties
because we do not allow share properties or any other property,
to be set on a snapshot itself execpt for user properties.

This commit skips iterating over snapshots for share properties,
instead iterate over all child dataset and their children for share
properties.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #16877

Details

Provenance
Umer Saleem <usaleem@ixsystems.com>Authored on Dec 19 2024, 8:02 PM
GitHub <noreply@github.com>Committed on Dec 19 2024, 8:02 PM
Parents
rGf00a57a7868f: zfs_main: fix alignment on props usage output
Branches
Unknown
Tags
Unknown