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
This commit is contained in:
parent
c3fe1633d0
commit
8e918ec439
6
UPDATING
6
UPDATING
@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS SLOW:
|
||||
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.
|
||||
|
@ -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
|
||||
|
@ -9,3 +9,5 @@ device mem
|
||||
|
||||
options GEOM_PART_BSD
|
||||
options GEOM_PART_MBR
|
||||
|
||||
options VFS_ALLOW_NONMPSAFE
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -30,3 +30,6 @@ options NATIVE
|
||||
device atpic
|
||||
|
||||
options NEW_PCIB
|
||||
|
||||
# Allow mounting non-MPSAFE filesystems
|
||||
options VFS_ALLOW_NONMPSAFE
|
||||
|
@ -20,3 +20,6 @@ options GEOM_PART_GPT
|
||||
options GEOM_PART_MBR
|
||||
|
||||
options NEW_PCIB
|
||||
|
||||
# Allow mounting non-MPSAFE filesystems
|
||||
options VFS_ALLOW_NONMPSAFE
|
||||
|
@ -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);
|
||||
|
@ -9,3 +9,5 @@ device uart_ns8250
|
||||
|
||||
options GEOM_PART_BSD
|
||||
options GEOM_PART_MBR
|
||||
|
||||
options VFS_ALLOW_NONMPSAFE
|
||||
|
@ -29,3 +29,6 @@ options GEOM_PART_PC98
|
||||
device atpic
|
||||
|
||||
options NEW_PCIB
|
||||
|
||||
# Allow mounting non-MPSAFE filesystems
|
||||
options VFS_ALLOW_NONMPSAFE
|
||||
|
@ -12,3 +12,6 @@ device uart_z8530
|
||||
|
||||
options GEOM_PART_APM
|
||||
options GEOM_PART_MBR
|
||||
|
||||
# Allow mounting non-MPSAFE filesystems
|
||||
options VFS_ALLOW_NONMPSAFE
|
||||
|
@ -21,3 +21,6 @@ options GEOM_PART_VTOC8
|
||||
options SUNKBD_EMULATE_ATKBD
|
||||
|
||||
options NEW_PCIB
|
||||
|
||||
# Allow mounting non-MPSAFE filesystems
|
||||
options VFS_ALLOW_NONMPSAFE
|
||||
|
Loading…
Reference in New Issue
Block a user