User: Password:
Subscribe / Log in / New account


From:  Rob Landley <>
Subject:  [RFC] rootmpfs
Date:  Wed, 03 Apr 2013 07:30:08 -0500
Message-ID:  <1364992208.18069.18@driftwood>
Archive-link:  Article

Attached is my quick and dirty hack to make rootfs be tmpfs when  
enabled. It can't be this easy or somebody would have done it in the  

Yes, it's got an #ifdef and out of place prototypes. Yes, it manually  
calls a module
init function and compensates by making it reentrant. But it works, and  
when I
"cat /dev/zero > filename" the filesystem fills _up_ instead of  
panicing the kernel.

So now that I've posted the error, would someone please tell me how I  
_should_ have done it?


P.S. If I actually change the filesystem type to a name other than  
"rootfs", it panics on the way up because various bits of the kernel  
are looking for that magic name. Sigh.

P.P.S. removing MS_NOUSER is actually intentional, there's a local cray  
patch that does the same thing because otherwise you can't --bind mount  
directories out of this filesystem, which is a thing they wanted to do.--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds