Current-Users archive

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

Re: union mounts, mfs, and newsyslog



    Date:        Tue, 07 Jul 2009 13:13:00 -0400
    From:        Miles Nordin <carton%Ivy.NET@localhost>
    Message-ID:  <oq4otoa02r.fsf%castrovalva.Ivy.NET@localhost>

  | what if the file has more than one name?
  | 
  | echo foo > a
  | ln a b
  | mv a c
  | echo bar > c
  | cat b         <--- wrong result

You don't need the rename to see that effect, unionfs does that
already (consider it a feature) - that is, put a linked file in
the lower half of a unionfs, write in it (though the upper layer
mount point) and the name you picked to write in shows the new
data, the other name retains the old data, and the files no longer
appear to be linked (in the upper layer, look via the lower layer
pathname, and all is unchanged, of course).

This is kind of unavoidable in the "copy to write" semantics that unionfs
provides - the link after all might be anywhere in the lower tree
(even obscured under some other mount point so no normal file system
traversal would find it).

kre



Home | Main Index | Thread Index | Old Index