Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153216536
D15625.id43165.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15625.id43165.diff
View Options
Index: sys/conf/NOTES
===================================================================
--- sys/conf/NOTES
+++ sys/conf/NOTES
@@ -1111,6 +1111,9 @@
# Write-protect the md root device so that it may not be mounted writeable.
options MD_ROOT_READONLY
+# Allow to read MD image from external memory regions
+options MD_ROOT_MEM
+
# Disk quotas are supported when this option is enabled.
options QUOTA #enable disk quotas
Index: sys/conf/options
===================================================================
--- sys/conf/options
+++ sys/conf/options
@@ -168,6 +168,7 @@
MD_ROOT_FSTYPE opt_md.h
MD_ROOT_READONLY opt_md.h
MD_ROOT_SIZE opt_md.h
+MD_ROOT_MEM opt_md.h
MFI_DEBUG opt_mfi.h
MFI_DECODE_LOG opt_mfi.h
MPROF_BUFFERS opt_mprof.h
Index: sys/dev/md/md.c
===================================================================
--- sys/dev/md/md.c
+++ sys/dev/md/md.c
@@ -180,6 +180,10 @@
*/
u_char mfs_root[MD_ROOT_SIZE*1024] __attribute__ ((section ("oldmfs")));
const int mfs_root_size = sizeof(mfs_root);
+#elif defined(MD_ROOT_MEM)
+/* MD region already mapped in the memory */
+volatile u_char *mfs_root;
+volatile int mfs_root_size;
#else
extern volatile u_char __weak_symbol mfs_root;
extern volatile u_char __weak_symbol mfs_root_end;
@@ -2074,8 +2078,13 @@
#ifdef MD_ROOT
if (mfs_root_size != 0) {
sx_xlock(&md_sx);
+#ifdef MD_ROOT_MEM
+ md_preloaded(__DEVOLATILE(u_char *, mfs_root), mfs_root_size,
+ NULL);
+#else
md_preloaded(__DEVOLATILE(u_char *, &mfs_root), mfs_root_size,
NULL);
+#endif
sx_xunlock(&md_sx);
}
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 9:01 PM (1 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31864443
Default Alt Text
D15625.id43165.diff (1 KB)
Attached To
Mode
D15625: md: use prestaged mfs_root
Attached
Detach File
Event Timeline
Log In to Comment