revert r304520, set canmount=on is not supposed to mount the filesystem
Not sure where I got the idea that it should. See https://github.com/openzfs/openzfs/pull/218 Reported by: mahrens Pointyhat to: avg MFC after: 5 days
This commit is contained in:
parent
753a007f0d
commit
9170c18bb9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308985
@ -1615,17 +1615,12 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props)
|
|||||||
assert(cl_idx < nvl_len);
|
assert(cl_idx < nvl_len);
|
||||||
/*
|
/*
|
||||||
* We don't want to unmount & remount the dataset when changing
|
* We don't want to unmount & remount the dataset when changing
|
||||||
* its canmount property. We only use the changelist logic to
|
* its canmount property to 'on' or 'noauto'. We only use
|
||||||
* unmount when setting canmount=off for a mounted filesystem
|
* the changelist logic to unmount when setting canmount=off.
|
||||||
* or when setting canmount=on for an unmounted filesystem.
|
|
||||||
* For all other changes to canmount property the filesystem
|
|
||||||
* remains the same.
|
|
||||||
*/
|
*/
|
||||||
if (prop != ZFS_PROP_CANMOUNT ||
|
if (prop != ZFS_PROP_CANMOUNT ||
|
||||||
(fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF &&
|
(fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF &&
|
||||||
zfs_is_mounted(zhp, NULL)) ||
|
zfs_is_mounted(zhp, NULL))) {
|
||||||
(fnvpair_value_uint64(elem) == ZFS_CANMOUNT_ON &&
|
|
||||||
!zfs_is_mounted(zhp, NULL))) {
|
|
||||||
cls[cl_idx] = changelist_gather(zhp, prop, 0, 0);
|
cls[cl_idx] = changelist_gather(zhp, prop, 0, 0);
|
||||||
if (cls[cl_idx] == NULL)
|
if (cls[cl_idx] == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
Reference in New Issue
Block a user