1. 09 Mar, 2019 10 commits
    • J. R. Okajima's avatar
      aufs: inode op, del, rmdir · 5755f006
      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: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      5755f006
    • J. R. Okajima's avatar
      aufs: hnotify 3/3, callers · f8ec4890
      J. R. Okajima authored
      
      
      In order to prevent firing the notify event from aufs itself, hnotify
      feature is suspend/resume-able. They are combined with mutex lock/unlock
      for the parent dir.
      
      See also previous commits.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      f8ec4890
    • J. R. Okajima's avatar
      aufs: hnotify 1/3, headers · 9dc58c2b
      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: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      9dc58c2b
    • 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 2/7, internal lookup for the target · 3be12838
      J. R. Okajima authored
      
      
      Basically copy-up is done by these steps using au_pin (in another
      commit).
      - lock the target parent mutex
      - lookup a negative dentry with a whiteout-ed temporary unique name
      - create it
      - unlock the target parent mutex
      - copy filedata
      - copy metadata (inode attributes)
      - lock the target parent mutex
      - rename the temporary name to the target name
      - unlock the target parent mutex
      
      This commit contains step2 mainly.
      I hope someday aufs uses O_TMPFILE for this.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      3be12838
    • J. R. Okajima's avatar
      aufs: pin or lock the parent dir and the child on a branch · 9f923257
      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: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      9f923257
    • J. R. Okajima's avatar
      aufs: writable branch 3/3, diropq · 0ba3f959
      J. R. Okajima authored
      
      
      The functions to create/delete the opaque directory marker (called
      'diropq') on the added writable branch.
      For details, refer to previous commit.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      0ba3f959
    • J. R. Okajima's avatar
      aufs: writable branch 2/3, body · 59ad1975
      J. R. Okajima authored
      
      
      Actually prepare the whiteout bases on the adding writable branch.
      For details, refer to previous commit.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      59ad1975
    • J. R. Okajima's avatar
      aufs: writable branch 1/3, white-out · 72a970fc
      J. R. Okajima authored
      
      
      The writable branch prepares a few files and dirs for whiteouts.
      For branch filesystems which doesn't support link(2), there is "nolwh"
      attribute. On the branch which is specified this attribute, aufs never
      try link(2) for whitout and always creat(2) it.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      72a970fc
    • J. R. Okajima's avatar
      aufs: white-out 1/2 · 2a7e7277
      J. R. Okajima authored
      
      
      The whiteout represents a logical deletion.
      Although the document in this commit mentioned about rmdir(2) and
      rename(2) for dir, this commit doesn't contain such functions. They will
      be added in later commits.
      Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
      2a7e7277