handle special file type in tmpfs

Glen glen.leeder at nokia.com
Thu Apr 19 23:12:54 UTC 2007

ext Howard Su wrote:
>> Glen wrote:
>> > Hi Howard,
>> >
>> > May I ask if you are using the tmpfs port by Rohit Jalan? A link to
>> > his work can be found on this page:
>> > http://www.freebsd.org/projects/ideas/
> Yes. The ideas page bring me to this working.
>> >
>> > I am currently using the BETA3 tmpfs port and have experienced an
>> > issue with the FIFO support for tmpfs. I believe that this is because
>> > the tmpfs_fifoops.c specifies an incomplete vnode operations vector
>> > (vop_vector) for tmpfs. The vop_vector allows you to specify all the
>> > vnode operations for a particular filesystem.
> I already fix that in my WIP. you can check the code in the perforce.
> http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/user/howardsu/truss/sys/fs/tmpfs 
> My working currently based on Beta3.
>> >
>> > If you check out ufs/ufs_vnops.c it specifies a global vop vector for
>> > most file types and then a different vop_vector for FIFO file types.
>> > Rohit's tmpfs port does a similar thing. I have populated the tmpfs
>> > vop_vector in this port and FIFO seems to work a better although I
>> > haven't fully tested it yet.  Maybe this information helps you get to
>> > a solution.
> You are right.
>> >
>> > I am keen to get tmpfs into the Freebsd tree and have been
>> > communicating with Rohit regarding this. He currently doesn't have
>> > time to do further improvements and I have offered to help get this
>> > tmpfs port into Freebsd. I am awaiting a response to this (we only
>> > started talking last week).
>> >
>> > This port has a few outstanding items:
>> >
>> > * MP safeness (some locking may be required). I have started testing
>> > tmpfs on an MP system.
> Can you try my WIP?(I can send you the patch against -Current) I add
> some basic locking stuffs. I am glad to work with you together. Now I
> don't have a MP system to test.
I'll be very happy to try it out and should get a chance to try it 
today. I think I may need to look for/write some test software to 
exercise the code in an MP scenario unless you already know of a 
regression test  that does this.
>> > * Security audit (not sure what's required for this)
>> > * Quota support, ACL work is pending
> Do we really need this? What's user scenerio to use Quota or ACL for a
> TMPFS? I can be conveienced.
I guess not for the first release. I just mentioned this list as I know 
these things were not yet done. I see that Brook has expressed an 
interest in some of this stuff but also mentions it is not critical.
>> > * Two data I/O mechanisms are benchmarked, deciding which one to use
>> > is still pending
> You can help.
> I really help to see you have interesting. It will be better if we can
> work together. Besides the locking & fifo fixing, I also working on
> the following tasks:
> 1. Catch up the main tree changes related FS after Rohit post his patch.
> 2. Port regression test cases
> 3. Remove un-named union so that tmpfs can build in a kernel
I will be glad to help in any way I can. I will start with the MP system 
testing. Please let me know if you are aware of any other problems or 
tasks that I can help with.

More information about the freebsd-fs mailing list