bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new tmpfs filesystem


From: Roland McGrath
Subject: new tmpfs filesystem
Date: Fri, 29 Dec 2000 02:38:29 -0500 (EST)

I've written a new in-core filesystem called tmpfs.  This new code is
checked into the hurd cvs repository under hurd/tmpfs, but not built by
default.  You can try building it by configuring your hurd build directory
and then doing "cd tmpfs; make".  Please let me know about any errors you
find (you can report them here).  I have not even compiled this code, since
I don't have a complete development environment handy.  But since it is in
the repository and available to anyone who cares, I thought I would mention
it here.

This filesystem is similar to tmpfs in SunOS, and vaguely similar to mfs in
BSD.  Whereas mfs is essentially a regular filesystem (ufs) stored in
virtual memory instead of a disk, this tmpfs does not use a normal
filesystem format at all.  It is written using the libdiskfs library and so
acts very much like the ext2fs and ufs filesystems do.  But it stores its
meta-data and directories directly in simple in-core data structures, and
uses memory objects implemented by the default pager to hold the contents
of regular files.

You start this filesystem as a translator like other filesystems:

        settrans -ca /test-tmp /hurd/tmpfs 100M

It requires an argument saying how much virtual memory to use for the
filesystem data (and meta-data).  The memory and/or swap space is is not
used just by running the filesystem.  It mainly provides something for df
to print, and sets a limit at which you will get "Disk full" errors.  Only
the amount of space actually used (as shown by df) consumes virtual memory.
You can change the limit later with "fsysopts /test-tmp 200M".

That is, that's what it will do if it works.  You'll probably have to debug
it a bit for me.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]