Inspired by a discussion with Christoph Hellwig, I tried to recreate a patch that he did a few years ago to add support for writing to a mounted cramfs file system. It still has known problems (and likely unknown ones), but should be good enough for practical use. I've been able to boot a full Ubuntu installation from a cramfs image and work with it normally. The intention is to use it for instance on read-only root file systems like CD-ROM, or on compressed initrd images. In either case, no data is written back to the medium, but remains in the page/inode/dentry cache, like ramfs does. Many existing systems currently use unionfs or aufs for this purpose, by overlaying a tmpfs over a read-only file system like cramfs, squashfs or iso9660. IMHO, it would be a much nicer solution to not require unionfs for a simple case like this, but rather have support for it in the file system. If people find this useful, we can do the same in other read-only file system. Writing to existing files is broken in at least two corner cases, and I'm still looking for a solution here: When you truncate an on-disk to make it larger, reading beyond the old end of the file will make cramfs try to read from disk instead of filling with zeroes. I'm not sure if this can be solved without adding additional members to the inode structure (using a private inode cache) to remember the end of the on-disk file. Deleting a preexisting file currently does not free the inode and page cache for that file, which I assume is easy to fix. Also, the i_nlink field of directories is always 1, and has always been on cramfs. Getting the count right should simplify the code a bit and make it more correct according to posix, but will cost a bit of performance on 'stat'. The patch series also lives on git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground.git cramfs Comments? Arnd <>< --
| Christoph Lameter | [04/14] vcompound: Core piece |
| Rafael J. Wysocki | 2.6.24-rc4-git5: Reported regressions from 2.6.23 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Andrew Morton | Re: 2.6.21-rc2-mm1 |
git: | |
| Ken Pratt | pack operation is thrashing my server |
| Kyle Moffett | Using GIT to store /etc (Or: How to make GIT store all file permission bits) |
| Nicolas Pitre | Re: Cleaning up git user-interface warts |
| Toby White | Using Filemerge.app as a git-diff viewer |
| Richard Stallman | Real men don't attack straw men |
| Peter | OpenBSD as Virtualbox guest |
| Richard Daemon | OpenBSD 4.3 running in VirtualBox? Anyone have it working properly? |
| Mark Zimmerman | alix 2c3 bios version |
| Christoph Hellwig | Re: silent semantic changes with reiser4 |
| Al Boldi | Re: [RFD] Incremental fsck |
| Theodore Tso | Re: [RFC 0/13] extents and 48bit ext3 |
| Josef Jeff Sipek | [PATCH 22 of 23] Unionfs: Unlink |
