Date: Sun, 3 Apr 2016 07:42:13 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297521 - head/cddl/contrib/opensolaris/lib/libzfs/common Message-ID: <201604030742.u337gD1e029916@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Sun Apr 3 07:42:13 2016 New Revision: 297521 URL: https://svnweb.freebsd.org/changeset/base/297521 Log: fix zfs set canmount=off on an unmounted filesystem Previously this operation tried to unmount and remount children. Also see https://www.illumos.org/issues/6428. MFC after: 2 weeks X-Needs-Upstreaming: illumos Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Apr 3 07:40:33 2016 (r297520) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Apr 3 07:42:13 2016 (r297521) @@ -1633,8 +1633,9 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl * 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604030742.u337gD1e029916>