Date: Fri, 22 Jun 2012 20:38:09 +0000 (UTC) From: Martin Matuska <mm@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r237457 - stable/8/cddl/contrib/opensolaris/lib/libzfs/common Message-ID: <201206222038.q5MKc9Jp099093@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mm Date: Fri Jun 22 20:38:08 2012 New Revision: 237457 URL: http://svn.freebsd.org/changeset/base/237457 Log: MFC r237119: Do not remount ZFS dataset if changing canmount property to "on" and dataset is already mounted. PR: 167905 Submitted by: Bryan Drewery <bryan@shatow.net> Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri Jun 22 20:38:00 2012 (r237456) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri Jun 22 20:38:08 2012 (r237457) @@ -1485,11 +1485,13 @@ zfs_prop_set(zfs_handle_t *zhp, const ch /* * If the dataset's canmount property is being set to noauto, + * or being set to on and the dataset is already mounted, * then we want to prevent unmounting & remounting it. */ do_prefix = !((prop == ZFS_PROP_CANMOUNT) && (zprop_string_to_index(prop, propval, &idx, - ZFS_TYPE_DATASET) == 0) && (idx == ZFS_CANMOUNT_NOAUTO)); + ZFS_TYPE_DATASET) == 0) && (idx == ZFS_CANMOUNT_NOAUTO || + (idx == ZFS_CANMOUNT_ON && zfs_is_mounted(zhp, NULL)))); if (do_prefix && (ret = changelist_prefix(cl)) != 0) goto error;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206222038.q5MKc9Jp099093>