Re: Fallthrus as full-length symlinks?

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

 



On Fri, Nov 13, 2009 at 08:55:36PM +0100, Arnd Bergmann wrote:
> On Friday 13 November 2009, Erez Zadok wrote:
> > > The interesting thing about
> > > this idea is that it could theoretically let us rename a file from the
> > > low level file system to another place in the low-level file system
> > > without copying the contents of the file up.  Basically, we can
> > > arbitrarily swizzle the namespace of the low-level by maintaining a
> > > set of symlinks above.
> > 
> > So now you're proposing to allow something like multiple writeable branches,
> > in that you allow something other than the topmost branch to be modified.
> > Moreover, it appears that what you're proposing will need to modify two or
> > more branches, right?
> 
> I think you misunderstood. If the idea is that you can do a
> 'mv file_on_lower directory_on_higher/', you would just change the
> magic symlink on the higher branch, without writing to the lower
> branch, but you are able to work as if you can effectively do
> operations that would otherwise require write access on the lower
> branch.

Arnd is right - only the top layer is modified.  Right now, renaming a
file on the lower layer requires copying up the contents of the file
to the top layer, creating the new link to it, and creating a whiteout
over the old name.  This approach would instead leave the contents of
the file on the lower layer, create a new link to it which contains
the full path of the target in the lower layer, and create a whiteout
over the old name.  All of the modifications happen on the top layer
still.

> > > Is this useful?  Is it implementable?
> 
> I think it sounds very useful and simple, but I may also have missed something.
> One issue might be that with a lot of file systems stacked on top of
> each other, you could run out of stack space recursing through the
> symlinks, but that's something that may already be the case, or that
> can be worked around in other ways.

There would be only one layer of these symlinks possible.

> Another idea that I first had when reading the suggestion was to use a
> symlink to self (ln -s x x) as the encoding for a fallthrough. It does
> not allow renames like what you really describe, but it has another advantage
> in that it does not require extensions to the upper file system layout
> while not conflicting with any use case I can see.

That's certainly worth trying!

-VAL
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux