Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
This is my filemap feature patch updated for 2.4.19-46um. This version
includes the memfilemap functionality I posted earlier, now in a more
generalized form. The usage format for filemaps, as originally described by
Jeff Dike, has been modified from previous versions to require a namespace
table specified as part of the command string format. It now looks like
filemap=<table>,<table specific syntax>
'file' table filemaps are normal filename/fd pairs, as before, and look like
'vm' table filemaps are a pool of single use virtual memory file descriptors
(that are doled out as the UML calls create_mem_file()):
Note that the 'vm' table allows a simple range of file descriptors to be
specified, as suggested by Nick Craig-Wood.
A command line example for bash looks like this:
./linux filemap=file,12,/proc/cpuinfo filemap=vm,20-23 12</proc/cpuinfo
20<>/dev/shm/vm-file.1 21<>/var/tmp/vm-file.2 22<>/mnt/vm-file.3
The attached patch set has been broken down into functional components:
Patch #1 adds the basic filemap feature sources to UML.
Patch #2 modifies the create_mem_file() routine to support 'vm' filemaps.
Patch #3 does some house-cleaning to UML in preparation for 'file' filemaps.
Patch #4 modifies os-Linux/file.c to support 'file' filemaps.
Patch #5 shows how to add a new table by implementing a 'pid' filemap.
Filemapping the mconsole socket (not implemented here) may be a bit tricky
since it is not a regular file and a quick look shows it has some
complicated interactions within UML.
Another important filemap table not implemented here is /proc/mm for skas
mode operation. Theoretically, it might be possible to create a filemap
pool of /proc/mm descriptors this way:
./linux filemap=mm,100-199 100<>/proc/mm 101<>/proc/mm ...
this would require tracking accesses and releases of the fds in the 'mm'
table, which is not done in this patch set. Also, since Jeff has said that
/proc/mm is going away, any benefit from coding this feature, assuming it
would work at all, would likely be shortlived.
Please see my previous posts about filemaps and memfilemaps for more
information and discussion. Please feel free to report feedback on any
issues with this patch set, but keep in mind I take no responsibility for
Add photos to your e-mail with MSN 8. Get 2 months FREE*.