[Unionfs] Anybody looking at NFS exporting a unionfs ?

Josef Sipek jsipek at fsl.cs.sunysb.edu
Wed Sep 5 18:19:59 EDT 2007


On Wed, Sep 05, 2007 at 01:03:43PM -0400, Jesse I Pollard wrote:
> David P. Quigley wrote:
>> It is worth nothing that this might not be a trivial implementation. In
>> the past to ensure that this functionality was correct we needed some
>> sort of persistent inode store. This may not be true anymore but if it
>> is then it isn't as simple as implementing 3 functions.
>>   
> That was why I was trying the 2.6.20-rc6-odf1 release. It uses an auxilary 
> filesystem to generate and track
> only the inode numbers, but the export capability had already disappeared. 
> There ARE comments imbeded in the unionfs 2.1.2
> that refer to the odf about NFS support.
>
> I would definitely be interested.

ODF was an experimental branch to see if the concept makes sense. ODF will
come back in the next few months :)

> One alternative to the odf would be to add the largest possible inode
> number from the top level FS + 1 to an inode number from the next level
> down. This would introduce an "inode offset base" value to the table of
> branches - used to add to/subtract from the inode number , but would
> guarantee unique inodes as far as unionfs was concerned. Might add other
> numbers (maximum number of inodes in the branch fs) to make it easier to
> recalculate offsets during remount.  It also wouldn't easily work for
> writable branches that can dynamically add inode space.

I'm afraid that will not work. In the kernel, all the inode numbers are
64-bits long, and there's no way for anyone to know the range of valid inode
numbers from a fs (except the fs itself). Given this fact, each lower fs can
give us an inode number in the range { 0 .. (2^64)-1 }. To uniquely identify
a file, unionfs needs a <branch index, lower inum> tuple (~70 bits).
Ideally, we would be able to take this info and shove it into our own inode
number, but we'd have to somehow map ~70 bits into 64 bits of our own inum.

Beware, I've spend long enough pondering about this, that I might be fixated
on the <branch index, lower inum> concept that I don't see something more
creative.

Jeff.

-- 
If I have trouble installing Linux, something is wrong. Very wrong.
		- Linus Torvalds


More information about the unionfs mailing list