mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Fix generation of kernel uevents for snapshot rename on linux
`zvol_rename_minors()` needs to be given the full path not just the
snapshot name. Use code removed in a0bd735ad as a guide
to providing the necessary values.
Add ZTS check for /dev changes after snapshot rename. After
renaming a snapshot with 'snapdev=visible' ensure that the /dev
entries are updated to reflect the rename.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: James Dingwall <james@dingwall.me.uk>
Closes #14223
Closes #16600
This commit is contained in:
@@ -117,5 +117,18 @@ log_must zfs set snapdev=visible $TESTPOOL
|
||||
verify_inherited 'snapdev' 'hidden' $SUBZVOL $VOLFS
|
||||
blockdev_missing $SUBSNAPDEV
|
||||
blockdev_exists $SNAPDEV
|
||||
log_must zfs destroy $SNAP
|
||||
|
||||
# 4. Verify "rename" is correctly reflected when "snapdev=visible"
|
||||
# 4.1 First create a snapshot and verify the device is present
|
||||
log_must zfs snapshot $SNAP
|
||||
log_must zfs set snapdev=visible $ZVOL
|
||||
blockdev_exists $SNAPDEV
|
||||
# 4.2 rename the snapshot and verify the devices are updated
|
||||
log_must zfs rename $SNAP $SNAP-new
|
||||
blockdev_missing $SNAPDEV
|
||||
blockdev_exists $SNAPDEV-new
|
||||
# 4.3 cleanup
|
||||
log_must zfs destroy $SNAP-new
|
||||
|
||||
log_pass "ZFS volume property 'snapdev' works as expected"
|
||||
|
||||
Reference in New Issue
Block a user