- 09 Mar, 2019 10 commits
-
-
J. R. Okajima authored
By default, aufs doesn't copy-up the file in open(2). The file write operation is one of the trigger of the copy-up. Although I understand that O_RDWR or O_WRONLY should trigger the copy-up, it is not a good idea for the case of open(O_RDWR) + mmap(MAP_PRIVATE). In this case, all changes are not written-back to the file on disk, and the copy-up is meaningless entirely. In other words, aufs postpone the copy-up as possible. This design also applies to the file operation after branch management. Some of the opened file need to be refreshed after add/del/mod branches. Eg. detect the revealed same named one, open it, close the old one internally while the virtual file is kept opened. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Support for XATTR and ACL including several branch attributes to ignore the copy error around XATTR and ACL. NFS always sets MS_POSIXACL regardless its mount option 'noacl.' When MS_POSIXACL is set, generic_permission() calls check_acl() (via acl_permission_check()) and gets -EOPNOTSUPP because the NFS branch is mounted as 'noacl.' In aufs, h_permission() should not call generic_permission() in this case. The similar thing happens in coping-up XATTR. vfs_getxattr_alloc() returns -EOPNOTSUPP. See also the document in this commit. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
As a result of branch management, the virtual inode may point a different real inode from it used to. And aufs has to maintain its address_space_operations, since its definition may affect the behaviour. I know some people (including grsec-patch) doesn't like a non-const address_space_operations, but in order to keep the consistency of the behaviour, the correct address_space_operations is important. 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
Copy-up the ancestors of the target. Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
-
J. R. Okajima authored
Because the copy-up operation is big and has many parameters and functions, consolidate them in this commit. 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
Copy the inode attributes between branches. See also the document in this 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>
-