mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux: Fix mount/unmount when dataset name has a space
The custom zpl_show_devname() helper should translate spaces in to the octal escape sequence \040. The getmntent(2) function is aware of this convention and properly translates the escape character back to a space when reading the fsname. Without this change the `zfs mount` and `zfs unmount` commands incorrectly detect when a dataset with a name containing spaces is mounted. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #11182 Closes #11187
This commit is contained in:
@@ -51,6 +51,8 @@ function cleanup
|
||||
log_must zfs destroy -f ${datasets[$i]}
|
||||
((i = i + 1))
|
||||
done
|
||||
|
||||
zfs destroy -f "$TESTPOOL/with a space"
|
||||
}
|
||||
|
||||
log_onexit cleanup
|
||||
@@ -68,4 +70,8 @@ while (( $i < ${#datasets[*]} )); do
|
||||
((i = i + 1))
|
||||
done
|
||||
|
||||
log_must zfs create "$TESTPOOL/with a space"
|
||||
log_must zfs unmount "$TESTPOOL/with a space"
|
||||
log_must zfs mount "$TESTPOOL/with a space"
|
||||
|
||||
log_pass "'zfs create <filesystem>' works as expected."
|
||||
|
||||
Reference in New Issue
Block a user