1. 09 Mar, 2019 10 commits
    • J. R. Okajima's avatar
      aufs: fuse branch (including poll(2)) · 08ecca6f
      J. R. Okajima authored
      
      
      Fuse doesn't want the callers to access the inode attributes without
      issuing stat, and it is not assured that they are valid after lookup or
      iget().
      The inode attribute is critical for aufs, and aufs decided to call stat
      every time for fuse.
      Of course, it makes aufs slow. But when the branch fs is not fuse, stat
      is not called.
      
      Currently, only FUSE implements ->poll(), and aufs supports it.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      08ecca6f
    • J. R. Okajima's avatar
      aufs: loopback-mounted branch · 9512a2c3
      J. R. Okajima authored
      
      
      It is ok that the branch is loopback-mounted.
      But it had a problem if the backend fs-image is placed on another
      branch, and aufs had prohibited such nested branch for a long time due
      to the recursive lookup by 'loopN' daemon.
      I don't remember when it was, but the daemon stopped such recursive
      behaviour, but aufs is still prohibitting the nested branch via
      loopback-mount.
      Upon the request from users, aufs will allow the loopback-mounted branch
      on another branch by another patch (aufs4-loopback.patch in
      aufs4-standalone.git).
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      9512a2c3
    • 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, wbr_fd · de0ee5c9
      J. R. Okajima authored
      
      
      Provide a file descriptor corresponding the specified writable branch.
      The file descriptor will be used from user-space such as FHSM and
      libau.so. For details, see aufs-util.git.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      de0ee5c9
    • J. R. Okajima's avatar
      aufs: branch management, delete 1/3, file list · b6f19f4f
      J. R. Okajima authored
      
      
      Implement an internal list of opened files to allow deleting a branch
      which has an opened dir. Obviously I don't like such list.
      
      There was such list in linux as sb->s_files, but in linux-3.12 s_files
      became containing just a part of the opened files, and in linux-3.13 it
      was totally gone.
      Aufs still needs the file list, particularly for re-setting the branch
      attribute from RW to RO.
      After resetting to RO, aufs should return EROFS for write. In order to
      support such case, aufs keeps the late s_files and mark_files_ro()
      approach.
      
      See also the document in this commit.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      b6f19f4f
    • J. R. Okajima's avatar
      aufs: atomic_open 3/5, pass h_file to au_do_open() · 51a7f431
      J. R. Okajima authored
      
      
      Extend do_open_dir(), au_do_open_nondir() and au_do_open() to receive an
      additional parameter h_file, which is an opened file object by branch
      fs's ->atomic_open(). By this design/commit, aufs doesn't have to
      duplicate many codes into a new aufs_atomic_open() (in later commit),
      and can simply share them.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      51a7f431
    • J. R. Okajima's avatar
      aufs: file op · a3387b95
      J. R. Okajima authored
      
      
      Implement several f_op functions for non-dir.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      a3387b95
    • J. R. Okajima's avatar
      aufs: file op, mmap · 8d319094
      J. R. Okajima authored
      
      
      For details, read the document in this commit.
      I don't like this approach, but there is no other way currently. But it
      seems that UnionMount is trying add siblings of f_dentry and d_inode for
      linux-4.0 or later. It may become another light for aufs too.
      
      The finfo object which has ever mmapped is excluded from
      refreshing (based upon fi_mmapped). Otherwise we may corrupt the process
      memory space.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      8d319094
    • J. R. Okajima's avatar
      aufs: file op, open non-dir · b5bd8ebf
      J. R. Okajima authored
      
      
      Implement f_op->open() for non-directory.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      b5bd8ebf