HomeFreeBSD

Update the dataset name in handle after zfs_rename (#17040)

Description

Update the dataset name in handle after zfs_rename (#17040)

For zfs_rename, after the dataset name is successfully updated,
the dataset handle that was passed to zfs_rename, still contains
the old name, due to which, the dataset handle becomes invalid.
The following operations performed using this handle result in
error since the dataset with old name cannot be found anymore.

changelist_rename does update the names in dataset handles,
but those are temporary handles that were created during
changelist_gather. The original handle that was used to call
zfs_rename is not updated.

We should update the name in original ZFS handle after the IOCTL
for rename returns success for the operation.

Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>

Details

Provenance
Umer Saleem <usaleem@ixsystems.com>Authored on Feb 11 2025, 5:07 PM
GitHub <noreply@github.com>Committed on Feb 11 2025, 5:07 PM
Parents
rGb8c73ab7807b: zio: do no-op injections just before handing off to vdevs
Branches
Unknown
Tags
Unknown