o news - introduce a new semantics for link(2) and rename(2), and three policies to select one among multiple writable branches (completed). + implement a new create policy 'mfsrr.'
(quote from the aufs manual) Policies to Select One among Multiple Writable Branches Aufs has some policies to select one among multiple writable branches when you are going to write/modify something. There are two kinds of policies, one is for newly create something and the other is for inter- nal copy-up. You can select them by specifying mount option `cre- ate=CREATE_POLICY' or `cpup=COPYUP_POLICY.' These policies have no meaning when you have only one writable branch. If there is some mean- ing, it must be damaging the performance. Exceptions for policies In every cases below, even if the policy says that the branch where a new file should be created is /rw2, the file will be created on /rw1. o If there is a readonly branch with 'wh' attribute above the policy- selected branch and the parent dir is marked as opaque, or the tar- get (creating) file is whiteouted on the ro+wh branch, then the policy will be ignored and the target file will be created on the nearest upper writable branch than the ro+wh branch. /aufs = /rw1 + /ro+wh/diropq + /rw2 /aufs = /rw1 + /ro+wh/wh.tgt + /rw2 o If there is a writable branch above the policy-selected branch and the parent dir is marked as opaque or the target file is whiteouted on the branch, then the policy will be ignored and the target file will be created on the highest one among the upper writable branches who has diropq or whiteout. In case of whiteout, aufs removes it as usual. /aufs = /rw1/diropq + /rw2 /aufs = /rw1/wh.tgt + /rw2 o link(2) and rename(2) systemcalls are exceptions in every policy. They try selecting the branch where the source exists as possible since copyup a large file will take long time. If it can't be, ie. the branch where the source exists is readonly, then they will fol- low the copyup policy. o There is an exception for rename(2) when the target exists. If the rename target exists, aufs compares the index of the branches where the source and the target are existing and selects the higher one. If the selected branch is readonly, then aufs follows the copyup policy. Policies for creating create=tdp | top-down-parent Selects the highest writable branch where the parent dir exists. If the parent dir does not exist on a writable branch, then the internal copyup will happen. The policy for this copyup is always `bottom-up.' This is the default policy. create=rr | round-robin Selects a writable branch in round robin. When you have two writable branches and creates 10 new files, 5 files will be cre- ated for each branch. mkdir(2) systemcall is an exception. When you create 10 new directories, all are created on the same branch. create=mfs[:second] | most-free-space[:second] Selects a writable branch which has most free space. In order to keep the performance, you can specify the duration (`second') which makes aufs hold the index of last selected writable branch until the specified seconds expires. The first time you create something in aufs after the specified seconds expired, aufs checks the amount of free space of all writable branches and the held branch index will be updated. The default value is 30 sec- onds. create=mfsrr:low[:second] | most-free-space-round-robin:low[:second] Selects a writable branch in most-free-space mode first, and then round-robin mode. If the selected branch has less free space than the specified value `low`, then aufs re-tries in round-robin mode. You can also specify the duration (`second') which is equivalent to the `mfs' mode. Policies for copy-up cpup=tdp | top-down-parent Equivalent to the same named policy for create. This is the default policy. cpup=bup | bottom-up-parent Selects the writable branch where the parent dir exists and the branch is nearest upper one from the copyup-source. cpup=bu | bottom-up Selects the nearest upper writable branch from the copyup- source, regardless the existence of the parent dir. (end of quote) o bugfix - bugfix: remove __exit attribute from sysaufs_fin(). o misc - replace 'hidden_' prefix by 'h_.' - refine to support every version of realtime patch. ---------------------------------------------------------------------- Index: fs/aufs/i_op_del.c - replace 'hidden_' prefix by 'h_.' Index: fs/aufs/opts.c Index: fs/aufs/opts.h Index: fs/aufs/super.c Index: fs/aufs/wbr_policy.c Index: util/aufs.in.5 - introduce a new semantics for link(2) and rename(2), and three policies to select one among multiple writable branches (completed). + implement a new create policy 'mfsrr.' Index: fs/aufs/sysaufs.c - bugfix: remove __exit attribute from sysaufs_fin(). Index: patch/rt-compat.patch - refine to support every version of realtime patch. Index: README Index: fs/aufs/branch.c Index: fs/aufs/cpup.c Index: fs/aufs/i_op_ren.c Index: include/linux/aufs_type.h Index: patch/openvz_028stab039.1.patch Index: sample/linux-vserver.txt - less important changes. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/