OpenZFS 6428 - set canmount=off on unmounted filesystem tries to unmount children
Authored by: Andriy Gapon <andriy.gapon@clusterhq.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Gordon Ross <gordon.w.ross@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Ported-by: George Melikov <mail@gmelikov.ru> OpenZFS-issue: https://www.illumos.org/issues/6428 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c079fa4 Closes #5628
This commit is contained in:
parent
ec923db25c
commit
b87baa7ed2
|
@ -1628,8 +1628,9 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props)
|
|||
* its canmount property to 'on' or 'noauto'. We only use
|
||||
* the changelist logic to unmount when setting canmount=off.
|
||||
*/
|
||||
if (!(prop == ZFS_PROP_CANMOUNT &&
|
||||
fnvpair_value_uint64(elem) != ZFS_CANMOUNT_OFF)) {
|
||||
if (prop != ZFS_PROP_CANMOUNT ||
|
||||
(fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF &&
|
||||
zfs_is_mounted(zhp, NULL))) {
|
||||
cls[cl_idx] = changelist_gather(zhp, prop, 0, 0);
|
||||
if (cls[cl_idx] == NULL)
|
||||
goto error;
|
||||
|
|
Loading…
Reference in New Issue