Imagine a file /union/file.txt in these branches: 1: /rw/file.txt (most recently updated, copied-up here, some time ago already) 2: /ro/file.txt (readonly original) 3: /rw/ (empty writable branch)
Consider 1 is the first writable branch. User can edit file.txt in /union and changes are stored in branch 1. So far so good. After moving file.txt down to the next writable branch, the branches look like this: 1: /rw/ 2: /ro/file.txt (readonly original) 3: /rw/file.txt (most recently updated) >From the point of /union view, the file file.txt will be different after the move down - since /union/file.txt will show the original file from the readonly branch 2, not the modified file which is now on branch 3. Is that your intention? I think that it should be disabled to move a file down if there are readonly branches in the middle which contain the file. Or at least it should be documented that the file as seen through /union/file.txt may be different after move-down since the unmodified version will show up from the readonly branch I think I will not personally use the move-down function, this is just my feedback as I understand it. Thank you Tomas M On Mon, Jul 1, 2013 at 8:15 AM, <sf...@users.sourceforge.net> wrote: > > Hello all, > > I am considering a new feature "move-down", which will be a first step > of "file-based hierarchy storage management." > Here is a simple document for it. And I want you to try reading it and > post a comment. > > Thanks in advance. > > J. R. Okajima > > > Move-down > ---------------------------------------------------------------------- > "Copy-up" is one of the essential feature in aufs. It copies a file from > the lower readonly branch to the upper writable branch when a user > changes something about the file. > "Move-down" is an opposite action of copy-up. Basically this action is > ran manually instead of automatically and internally. > > Sometimes users want to move-down a file from the upper writable branch > to the lower readonly or writable branch. For instance, > - the free space of the upper writable branch is going to run out. > - create a new intermediate branch between the upper and lower branch. > - etc. > > For this purpose, use "aumvdown" command in aufs-util. > > ======================================== > There are several conditions to achieve the action. > - files in use (in aufs world) are not be handled. > - hard-linked (or pseudo-linked in aufs world) files are not be handled. > For such file, remount aufs or use "auplink." > - directories are not be handled since the action doesn't behave > recursivly and the moving-down an empty dir has less meaning. > > When all these conditions are not satisfied, EBUSY will be returned. > > Note that any directory in aufs can be "opaque". If any of the ancestor > dir of the file is set to opaque, you may not see the moved (or copied) > file. It is strongly discouraged to specify "diropq=always" if you have > a plan to use move-down. > Actually the command checks the parent dir's opaqueness and returns > EROFS if set, but not for all ancestors. This confusing situation can > happen when a user rename(2) a dir directly on a branch (by-passing > aufs) since aufs cannot stop such user's direct rename(2) operation. > > Also note about the whiteout on the lower branches, including the > readonly branches with the attribute "=ro+wh" is set. > Similar to the opaqued dir, the whiteout can hide the lower same-named > file and you may not see the moved (or copied) file either. > Actually the command checks the whiteout in the parent dir and removes > if found, but not for all ancestors. > > And there are several options for the action. > - over-write > when this option is enabled and if the same named file exists on the > target branch, it will be over-written. otherwise EEXIST will be > returned. > - keep the source > Essentially this option choose the action whether "copy" or "move." > when this option is disabled, the source file on the upper writable > branch is removed after copying-down which results "move". > - source and target branch id > By default, the source branch is the first writable branch where the > file exists, and the target branch is the next lower writable > branch. By specifying these options users can choose the other > source/target branch even if that branch attribute is set as readonly > in aufs world. Obviously no can write to the natively readonly > filesystem which will return EROFS. > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev