Date: Tue, 8 Nov 2011 10:18:07 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227333 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/kern sys/mips/conf sys/pc98/conf sys/powerpc/conf sys/sparc64/conf Message-ID: <201111081018.pA8AI7ha027020@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: attilio Date: Tue Nov 8 10:18:07 2011 New Revision: 227333 URL: http://svn.freebsd.org/changeset/base/227333 Log: Introduce the option VFS_ALLOW_NONMPSAFE and turn it on by default on all the architectures. The option allows to mount non-MPSAFE filesystem. Without it, the kernel will refuse to mount a non-MPSAFE filesytem. This patch is part of the effort of killing non-MPSAFE filesystems from the tree. No MFC is expected for this patch. Tested by: gianni Reviewed by: kib Modified: head/UPDATING head/sys/amd64/conf/DEFAULTS head/sys/arm/conf/DEFAULTS head/sys/conf/NOTES head/sys/conf/options head/sys/i386/conf/DEFAULTS head/sys/ia64/conf/DEFAULTS head/sys/kern/vfs_mount.c head/sys/mips/conf/DEFAULTS head/sys/pc98/conf/DEFAULTS head/sys/powerpc/conf/DEFAULTS head/sys/sparc64/conf/DEFAULTS Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Nov 8 08:29:05 2011 (r227332) +++ head/UPDATING Tue Nov 8 10:18:07 2011 (r227333) @@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20111108: + The option VFS_ALLOW_NONMPSAFE option has been added in order to + explicitely support non-MPSAFE filesystems. + It is on by default for all supported platform at this present + time. + 20111101: The broken amd(4) driver has been replaced with esp(4) in the amd64, i386 and pc98 GENERIC kernel configuration files. Modified: head/sys/amd64/conf/DEFAULTS ============================================================================== --- head/sys/amd64/conf/DEFAULTS Tue Nov 8 08:29:05 2011 (r227332) +++ head/sys/amd64/conf/DEFAULTS Tue Nov 8 10:18:07 2011 (r227333) @@ -22,3 +22,6 @@ options GEOM_PART_EBR_COMPAT options GEOM_PART_MBR options NEW_PCIB + +# Allow mounting non-MPSAFE filesystems +options VFS_ALLOW_NONMPSAFE Modified: head/sys/arm/conf/DEFAULTS ============================================================================== --- head/sys/arm/conf/DEFAULTS Tue Nov 8 08:29:05 2011 (r227332) +++ head/sys/arm/conf/DEFAULTS Tue Nov 8 10:18:07 2011 (r227333) @@ -9,3 +9,5 @@ device mem options GEOM_PART_BSD options GEOM_PART_MBR + +options VFS_ALLOW_NONMPSAFE Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Nov 8 08:29:05 2011 (r227332) +++ head/sys/conf/NOTES Tue Nov 8 10:18:07 2011 (r227333) @@ -1104,6 +1104,9 @@ options XFS # unsuitable for inclusion on machines with untrusted local users. options VFS_AIO +# Enable mounting of non-MPSAFE filesystems. +options VFS_ALLOW_NONMPSAFE + # Cryptographically secure random number generator; /dev/random device random Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Nov 8 08:29:05 2011 (r227332) +++ head/sys/conf/options Tue Nov 8 10:18:07 2011 (r227333) @@ -185,6 +185,7 @@ SYSVSHM opt_sysvipc.h SW_WATCHDOG opt_watchdog.h TURNSTILE_PROFILING VFS_AIO +VFS_ALLOW_NONMPSAFE VERBOSE_SYSINIT opt_global.h WLCACHE opt_wavelan.h WLDEBUG opt_wavelan.h Modified: head/sys/i386/conf/DEFAULTS ============================================================================== --- head/sys/i386/conf/DEFAULTS Tue Nov 8 08:29:05 2011 (r227332) +++ head/sys/i386/conf/DEFAULTS Tue Nov 8 10:18:07 2011 (r227333) @@ -30,3 +30,6 @@ options NATIVE device atpic options NEW_PCIB + +# Allow mounting non-MPSAFE filesystems +options VFS_ALLOW_NONMPSAFE Modified: head/sys/ia64/conf/DEFAULTS ============================================================================== --- head/sys/ia64/conf/DEFAULTS Tue Nov 8 08:29:05 2011 (r227332) +++ head/sys/ia64/conf/DEFAULTS Tue Nov 8 10:18:07 2011 (r227333) @@ -20,3 +20,6 @@ options GEOM_PART_GPT options GEOM_PART_MBR options NEW_PCIB + +# Allow mounting non-MPSAFE filesystems +options VFS_ALLOW_NONMPSAFE Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Tue Nov 8 08:29:05 2011 (r227332) +++ head/sys/kern/vfs_mount.c Tue Nov 8 10:18:07 2011 (r227333) @@ -37,6 +37,8 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_vfs_allow_nonmpsafe.h" + #include <sys/param.h> #include <sys/conf.h> #include <sys/fcntl.h> @@ -798,6 +800,14 @@ vfs_domount_first( * get. No freeing of cn_pnbuf. */ error = VFS_MOUNT(mp); +#ifndef VFS_ALLOW_NONMPSAFE + if (error == 0 && VFS_NEEDSGIANT(mp)) { + (void)VFS_UNMOUNT(mp, fsflags); + error = ENXIO; + printf("%s: Mounting non-MPSAFE fs (%s) is disabled\n", + __func__, mp->mnt_vfc->vfc_name); + } +#endif if (error != 0) { vfs_unbusy(mp); vfs_mount_destroy(mp); @@ -807,6 +817,11 @@ vfs_domount_first( vrele(vp); return (error); } +#ifdef VFS_ALLOW_NONMPSAFE + if (VFS_NEEDSGIANT(mp)) + printf("%s: Mounting non-MPSAFE fs (%s) is deprecated\n", + __func__, mp->mnt_vfc->vfc_name); +#endif if (mp->mnt_opt != NULL) vfs_freeopts(mp->mnt_opt); Modified: head/sys/mips/conf/DEFAULTS ============================================================================== --- head/sys/mips/conf/DEFAULTS Tue Nov 8 08:29:05 2011 (r227332) +++ head/sys/mips/conf/DEFAULTS Tue Nov 8 10:18:07 2011 (r227333) @@ -9,3 +9,5 @@ device uart_ns8250 options GEOM_PART_BSD options GEOM_PART_MBR + +options VFS_ALLOW_NONMPSAFE Modified: head/sys/pc98/conf/DEFAULTS ============================================================================== --- head/sys/pc98/conf/DEFAULTS Tue Nov 8 08:29:05 2011 (r227332) +++ head/sys/pc98/conf/DEFAULTS Tue Nov 8 10:18:07 2011 (r227333) @@ -29,3 +29,6 @@ options GEOM_PART_PC98 device atpic options NEW_PCIB + +# Allow mounting non-MPSAFE filesystems +options VFS_ALLOW_NONMPSAFE Modified: head/sys/powerpc/conf/DEFAULTS ============================================================================== --- head/sys/powerpc/conf/DEFAULTS Tue Nov 8 08:29:05 2011 (r227332) +++ head/sys/powerpc/conf/DEFAULTS Tue Nov 8 10:18:07 2011 (r227333) @@ -12,3 +12,6 @@ device uart_z8530 options GEOM_PART_APM options GEOM_PART_MBR + +# Allow mounting non-MPSAFE filesystems +options VFS_ALLOW_NONMPSAFE Modified: head/sys/sparc64/conf/DEFAULTS ============================================================================== --- head/sys/sparc64/conf/DEFAULTS Tue Nov 8 08:29:05 2011 (r227332) +++ head/sys/sparc64/conf/DEFAULTS Tue Nov 8 10:18:07 2011 (r227333) @@ -21,3 +21,6 @@ options GEOM_PART_VTOC8 options SUNKBD_EMULATE_ATKBD options NEW_PCIB + +# Allow mounting non-MPSAFE filesystems +options VFS_ALLOW_NONMPSAFE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111081018.pA8AI7ha027020>