Date: Tue, 01 May 2012 21:29:48 -0500 From: Bryan Drewery <bryan@shatow.net> To: freebsd-fs@freebsd.org Cc: vermaden <vermaden@interia.pl> Subject: ZFS canmount=on (from noauto) on mounted datasets Message-ID: <4FA09C1C.2090306@shatow.net>
next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 What am I missing here? On 9-RELEASE. I am unable to change 'canmount' from 'noauto' to 'on', on an already-auto-mounted dataset. # mount|grep "/var/log" zroot/ROOT/freebsd90/var/log on /var/log (zfs, local, noatime, noexec, nosuid, nfsv4acls) # zfs get -H -o value mounted zroot/ROOT/freebsd90/var/log yes # zfs get -H -o value canmount zroot/ROOT/freebsd90/var/log noauto # zfs set canmount=on zroot/ROOT/freebsd90/var/log cannot unmount '/var/log': Device busy ^^^^ I don't see any reference in zfs(1M) to 'canmount' causing automatically causing a [re]mount. This is understandable for 'mountpoint' of course. It seems zfs_prop_set() in libzfs_changelist is doing this by calling changelist_prefix(), as long as not using 'noauto', which does a remount. The comments for changelist_prop() indicate it's for changing 'mountpoint', which makes sense. Is this being incorrectly called in zfs_prop_set() for 'canmount=on/off'? The HEAD code looks to be prone to this as well in zfs_prop_set(). Code in question: /* * If the dataset's canmount property is being set to noauto, * 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)); if (do_prefix && (ret = changelist_prefix(cl)) != 0) goto error; Regards, Bryan Drewery -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPoJwbAAoJEG54KsA8mwz5qeUP/3QKNRZ2cg2n9uf6+zxf3Shi FQiUqJEiMGJ4UEWFUOpgJM1KIOT4ms9L64v5DozPrlnxVpFiHUEHI2PcOS1GzDue mPX7yTb87OXut263vp5EIYZUo/m03lbVH+Rkd01NTUipgXJWZNF8ShruekjjiPVN tvou0XyigqMScyrJ83DzUE0thpEvsDJ/8AoubhWw3p6SpgRLcdcAeDLVALazQRxB +vILmLtlTH3mBSXWDRLAtALKWJl4ewVDYNP8YhsDVhiCVP7vkc5C3pNyh+cbDHhH h1tKv3mArAiYMxOFHIu9Z/SkO9cfDqH25k2ezv8/x2QOgrqPQumERP3v9g1FxTc5 0KJ+ZkDQTeTiPtmkLDZ+jfl6CelgI9TvOAsR9ftQzeKZHMDWWNg5jpMBkchN3+YC wI3T/ETC581bG+eLIgm2+lBhDnf/cJBdkf6riW2hqvwv2KqjENel4WvQ13fe+n3/ kGRTWV5PrhRIOdMpjhiB4EV357n3HddGVhlt0aTmxQk/XoNxdJZufWU1Chi1+QB9 xsh1jHoce87kOb2TSmrbVROqoCPDng9ZgFV12crlk07MV8fEXRuSFPFA851uR2/P QPc96/0B/YZI1GUvWa8ru921fs0slzVvayM7strgb2jRQCFKvgN6CjalPn9SiMSH EZmhSUImjIOMN2225Wr9 =dxSV -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FA09C1C.2090306>