1. 22 Jan, 2020 1 commit
  2. 09 Mar, 2019 16 commits
    • J. R. Okajima's avatar
      aufs stdalone: full copyright sentence · 4010b936
      J. R. Okajima authored
      
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      4010b936
    • J. R. Okajima's avatar
      aufs: hfsplus branch · 5bb71622
      J. R. Okajima authored
      
      
      Special support for filesystems which acquires an inode mutex at final
      closing a file, eg, hfsplus.
      This trick is very simple and stupid, just to open the file before really
      necessary open to tell hfsplus that this is not the final closing.
      The caller should call au_h_open_pre() after acquiring the inode mutex,
      and au_h_open_post() after releasing it.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      5bb71622
    • J. R. Okajima's avatar
      aufs: fhsm (file-based hierarchical storage management) · 3be35a97
      J. R. Okajima authored
      
      
      This feature automatically handles MVDOWN in other commits.
      In user-space, a daemon monitors the free space of the branch and issues
      MVDOWN ioctl automatically when necessary. The main role is in
      user-space and several options are implemented.
      For a branch to join the FHSM circle, a new attribute 'fhsm' should be
      specified.
      
      See also the document in this commit.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      3be35a97
    • J. R. Okajima's avatar
      aufs: ioctl, mvdown 2/2, callers · ca3bca20
      J. R. Okajima authored
      
      
      Support for the options of MVDOWN feature, which allows to overwrite the
      existing entry, and writing to the branch even if its permission is RO.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      ca3bca20
    • J. R. Okajima's avatar
      aufs: ioctl, mvdown 1/2, body · bc962de7
      J. R. Okajima authored
      
      
      Another ioctl feature, move-down.
      The behaviour is, as you can guess, the opposite of copy-up.
      The feature called FHSM (file-based hierarchical storage management, in
      later commit) uses this ioctl aggressively.
      
      See also the document in this commit.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      bc962de7
    • J. R. Okajima's avatar
      aufs: branch management, delete 3/3, mount option · dea1d77c
      J. R. Okajima authored
      
      
      Implement the user interface.
      Since users often wonder "Why I cannot delete this branch?", 'verbose'
      option was introduced.
      
      You may think aufs should not hold several strings for the variation of
      the option, and the mount helper (/sbin/mount.aufs) can convert all
      variations to a single fixed string, and in kernel space aufs should
      contain this only one string.
      I agree, but in our real world, many users don't install
      /sbin/mount.aufs. To be convenient, aufs contains these variations.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      dea1d77c
    • J. R. Okajima's avatar
      aufs: file op, internal re-open when write · beeeb01e
      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: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      beeeb01e
    • J. R. Okajima's avatar
      aufs: xattr and acl · a76ab411
      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: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      a76ab411
    • J. R. Okajima's avatar
      aufs: DIO and dynamically customize address_space_operations · 5b336293
      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: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      5b336293
    • J. R. Okajima's avatar
      aufs: users' direct branch access · 27c33497
      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: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      27c33497
    • J. R. Okajima's avatar
      aufs: copy-up 7/7, white-out · e4226da5
      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: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      e4226da5
    • J. R. Okajima's avatar
      aufs: copy-up 6/7, directories · 377c9279
      J. R. Okajima authored
      
      
      Copy-up the ancestors of the target.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      377c9279
    • J. R. Okajima's avatar
      aufs: copy-up 5/7, simple interface · 253be9ad
      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: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      253be9ad
    • J. R. Okajima's avatar
      aufs: copy-up 4/7, body · f63b4f2f
      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: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      f63b4f2f
    • J. R. Okajima's avatar
      aufs: copy-up 1/7, attributes · f7f1bacc
      J. R. Okajima authored
      
      
      Copy the inode attributes between branches.
      See also the document in this commit.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      f7f1bacc
    • J. R. Okajima's avatar
      aufs: infos generation 2/2 · f2ade007
      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: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      f2ade007