HomeFreeBSD

ZVOL: Minor code cleanup

Description

ZVOL: Minor code cleanup

  • Remove zsda_tx field, it is used only once.
    • Remove unneeded string lengths checks, all names are terminated.
    • Replace few explicit MAXNAMELEN usages with sizeof().
    • Change dsname from MAXNAMELEN to ZFS_MAX_DATASET_NAME_LEN, as

expected by dsl_dataset_name(). Both are 256 bytes now, but it is
better to be safe.

This should have no functional difference.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15535

Details

Provenance
mavAuthored on Nov 27 2023, 9:16 PM
GitHub <noreply@github.com>Committed on Nov 27 2023, 9:16 PM
Parents
rG126efb588969: FreeBSD: Fix the build on FreeBSD 12
Branches
Unknown
Tags
Unknown