NetBSD-Bugs archive

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

Re: kern/46626: EROFS enforcement in namei breaks union mounts



The following reply was made to PR kern/46626; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/46626: EROFS enforcement in namei breaks union mounts
Date: Wed, 27 Jun 2012 04:20:00 +0000

 On Mon, Jun 25, 2012 at 07:05:04AM +0000, David Laight wrote:
  >  Letting a rename move files between layers does seem a little wrong!
 
 It can't. If the from and to sides of the rename select different
 layers, the result will be EXDEV. If this is not handled
 intelligently, almost all attempts to rename at a union mount will
 fail.
 
  >  > (There's another wrinkle with rename, which is that if the to-file
  >  > doesn't exist, the layer of the from-file should be selected.
  >  > Otherwise, most rename operations will give EXDEV. This is not easy to
  >  > arrange, but it's a different problem.)
  >  
  >  I think the layer of the from-file should always be selected.
  >  This might mean you can move a file so that it is hidden! but
  >  you really don't want to move a file from a low-layer into a
  >  higher layer just because the file exists in the higher layer.
 
 Again, you can't.
 
 But, how do you select the layer of the from-file for the to-file? It
 might not be the same directory and thus not part of the same union
 stack; also by the time rename sees it the union mount has already
 been processed.
 
 (In Plan 9 there are no cross-directory renames so it's a lot
 simpler.)
 
  >  Does the NetBSD code auto-created (and auto-delete) directories
  >  in the top layer?
 
 We aren't talking about onionfs here.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index