- 09 Mar, 2019 22 commits
-
-
J. R. Okajima authored
Implement i_op->link(). As aufs supports 'pseudo-link', aufs_link() can make it without copying-up. In the case of aufs_link() has to copy-up, the name of the target file is used as-is, and it is pseudo-linked. In other words, calling link(2) after the copy-up is unnecessary. See also struct.txt in previous commit. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Implement i_op->rename(). This is a big monster and I don't like it. In this version, the copy-up always happen. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Implement i_op->rmdir() with supporting logical deletion by whiteout including all children. As struct.txt in previous commit described, the target dir is renamed to a whiteout-ed temporary unique name in rmdir(2), and then removed asynchronously by the system global workqueue. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Implement i_op->unlink() with supporting logical deletion by whiteout. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Here are entry adding inode operations, i_op->create(), symlink(), mkdir(), mknod(), and tmpfile(). Obviously they return EOPNOTSUPP when the target branch fs doesn't support the operation. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Implement dir.i_op->lookup() and ->permission(). Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
This commit is just to prepare for the succeeding commit, and split to suppress the size of a single commit. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
As a part of looking-up, construct a virtual inode. After branch-management (add/del branches), the inode has to be refreshed to represent a revealed file. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
This is the hardest test to support UDBA (users' direct branch access). It uses 'fsnotify' internally. Detecting UDBA, decrements the generation of the cached aufs objects. In the next access to the file, aufs detects the generation is obsoleted and tries refreshing it. Eventually aufs cache will be updated to latest status. The fsnotify is set on the cached dirs on the non-RR branches. The RR (real readonly) branches will never be modified and it is unnecessary to set fsnotify for them. This commit is for the declarations mainly, and the body parts will be in succeeding commits. This feature is compiled only when CONFIG_AUFS_HNOTIFY is enabled. See also the document in this commit. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Aufs allows users' direct branch access (UDBA), ie. by-passing aufs. Of course it will make aufs inode/dentry-caches obsolete. In order to detect such change by the several tests, "udba=" option is introduced. For details, see lookup.txt in later commit. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Imagine a sequence such like this. - user opens a file which exists on the lower readonly branch. - user unlinks the file (still opened). its parent dir may be removed too. - user writes something to the file. Then aufs has to copy-up the unlinked file. Note that the copy-up in aufs is not done in open(2) by default. This commit handles this case by copy-up the file in write(2). The target directory is the one which aufs created internally for this purpose. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
The functions for - create the copy-up target file - copy filedata - copy metadata In copying filedata, I had tried splice_direct() instead of repeating read/write. Surprisingly, I could not see a big difference. So let's keep this approach for a while. Someday SEEK_DATA/SEEK_HOLE become more popular, it may help optimizing this read/write. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
The internal file read/write for copy-up in kernelspace. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
To create/delete/rename files including copy-up, aufs acquires several locks on the branch fs internally. These lock/unlock operations are consolidated into struct au_pin in this commit. au_pin handles - LOCKDEP class - re-validate/verify - suspend/resume HNOTIFY See also lookup.txt in later commit. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Actually prepare the whiteout bases on the adding writable branch. For details, refer to previous commit. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Aufs pseudo-link (plink) represents a virtual hardlink across the branches. To implement the plink maintenance mode, aufs uses procfs. See also the document in this commit. There is an external user-space utility called 'auplink' in aufs-util.git, which has these features. - 'list' shows the pseudo-linked inode numbers and filenames. - 'cpup' copies-up all pseudo-link to the writable branch. - 'flush' calls 'cpup', and then 'mount -o remount,clean_plink=inum' Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
XINO and XIB files are read and written frequently after unlinked, and it means that the remote filesystems are not suitable for them. Additionally aufs shows their metadata via debugfs (in later commit). To make it easier to do this, aufs expects branch filesystems to maintain their i_size and i_blocks. And it means some filesystem are not suitable for XINO. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
For details, see previous commit. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
The generation of iinfo and dinfo inherit sbinfo's. Also iinfo generation tracks the branch inode's generation to test the matching after the branch management. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Print various info about aufs inode. This feature is enabled when CONFIG_AUFS_DEBUG and the module parameter 'debug' are set. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
This is a very old debugging routine for rw_semaphore I was using privately and less meaningful to other people. It was (probably) before LOCKDEP feature was introduced, but now it is based upon LOCKDEP. This is compiled when CONFIG_AUFS_DEBUG is enabled. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
See the documents in this commit. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-