FreeBSD Bugzilla – Attachment 184793 Details for
Bug 221067
vfs.root.mountfrom.options="ro" did not take effect for a zfs root filesystem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
prototype fix for reference
vfs.root.mountfrom.options_ro_prototype_fix.patch (text/plain), 702 bytes, created by
David NewHamlet
on 2017-07-28 10:11:35 UTC
(
hide
)
Description:
prototype fix for reference
Filename:
MIME Type:
Creator:
David NewHamlet
Created:
2017-07-28 10:11:35 UTC
Size:
702 bytes
patch
obsolete
>--- /home/david/sandspace/private-freebsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c.orig >+++ /home/david/sandspace/private-freebsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c >@@ -80,6 +80,7 @@ > #include <sys/callb.h> > #include <sys/cpupart.h> > #include <sys/zone.h> >+#include <sys/systm.h> > #endif /* _KERNEL */ > > #include "zfs_prop.h" >@@ -2315,6 +2316,15 @@ > if (!mosconfig) > spa->spa_mode = FREAD; > >+ if (spa_is_root(spa)) { >+ char *s; >+ s = kern_getenv("vfs.root.mountfrom.options"); >+ if (spa->spa_mode != FREAD && strcmp(s, "ro") == 0) { >+ spa->spa_mode = FREAD; >+ } >+ freeenv(s); >+ } >+ > ASSERT(MUTEX_HELD(&spa_namespace_lock)); > > spa->spa_load_state = state; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 221067
: 184793