Re: [UNIONFS] 00/29 Unionfs and related patches pre-merge review (v2)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Erez Zadok <ezk@...>
Cc: <torvalds@...>, <akpm@...>, <hch@...>, <viro@...>, <linux-kernel@...>, <linux-fsdevel@...>, <mhalcrow@...>
Date: Saturday, February 2, 2008 - 4:45 pm

On Sat, Feb 02, 2008 at 01:45:15PM -0500, Erez Zadok wrote:

Correct.
 

Er...  For unionfs it's a much more monumental problem.  Look - you have
a mapping between the directory trees of layers; everything else is
defined in terms of that mapping ("this files shadows that file", etc.).

If you allow a mix of old and new mappings, you can easily run into the
situations when at some moment X1 covers Y1, X2 covers Y2, X2 is a descendent
of X1 and Y1 is a descendent of Y2.  You *really* don't want to go there -
if nothing else, defining behaviour of copyup in face of that insanity
will be very painful.

What's more, and what makes NFS a bad model, NFS client doesn't lock
directories of NFS server.  unionfs *does* locking of directories in
underlying layers, which means that you have an entirely new set of
constraints - you can deadlock easily.  As the matter of fact, your
current code suffers from that problem - it violates the locking rules
in operations on covered layers.
 

Ugh...  "Currently unionfs users tend to use it ways that do not trigger
fs corruption" is nice, but doesn't really address the "current unionfs
implementation contains races leadint to fs corruption"...

 
 
Different problem.  IIRC, that paper implicitly assumed that mapping between
vnodes in different layers would _not_ be subject to massive surgeries from
operations involved.


Keep in mind that the same directory can be seen elsewhere in the same
namespace (let alone the different ones).  The same fs can be seen in
any number of places...
 

For ext* and tmpfs it's a matter of trivial kernel patches (I can do the
entire bunch easily) + coordination with Ted to get feature flag for
ext*/teach e2fsck not to throw up on directory entries with type "whiteout".


NFS is more interesting ;-/  There the fallback to your scheme might be the
best available variant, if it can be converted into nfs_whiteout(dir, dentry)
+ modifications to existing methods...
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [UNIONFS] 00/29 Unionfs and related patches pre-merge re..., Al Viro, (Sat Feb 2, 4:45 pm)
Re: [UNIONFS] 00/29 Unionfs and related patches pre-merge re..., Christoph Hellwig, (Thu Jan 10, 11:08 am)
[PATCH 06/29] Unionfs: main header file, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 20/29] Unionfs: super_block operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 11/29] Unionfs: lower-level lookup routines, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 21/29] Unionfs: extended attributes operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 10/29] Unionfs: dentry revalidation, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 24/29] Unionfs: debugging infrastructure, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 12/29] Unionfs: rename method and helpers, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 05/29] Unionfs: fanout header definitions, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 28/29] VFS: export release_open_intent symbol, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 14/29] Unionfs: readdir helper functions, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 25/29] Unionfs file system magic number, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 16/29] Unionfs: inode operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 18/29] Unionfs: address-space operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 23/29] Unionfs: miscellaneous helper routines, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 04/29] Unionfs: main Makefile, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 22/29] Unionfs: async I/O queue, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 08/29] Unionfs: basic file operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 15/29] Unionfs: readdir state helpers, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 03/29] Makefile: hook to compile unionfs, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 01/29] Unionfs: documentation, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 17/29] Unionfs: unlink/rmdir operations, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 09/29] Unionfs: lower-level copyup routines, Erez Zadok, (Thu Jan 10, 10:59 am)
[PATCH 27/29] VFS path get/put ops used by Unionfs, Erez Zadok, (Thu Jan 10, 10:59 am)