RFC implement containerized syncfs for overlayfs
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 RFC Latest7 patches 13 repliesIn review
- v5 RFC10 patches 50 repliesSuperseded
- v4 RFC9 patches 14 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 RFC | 10 patches | 12 replies | Superseded | |
| v2 RFC | 8 patches | 14 replies | Superseded | |
| v1 RFC | 5 patches | 18 replies | Superseded |
Changes in v6 from the cover letter
- Rebase to latest overlayfs-next tree.
- Mark oerlay inode dirty when it has upper instead of marking dirty on modification.
- Trigger dirty page writeback in overlayfs' ->write_inode().
- Mark overlay inode 'DONTCACHE' flag.
- Delete overlayfs' ->writepages() and ->evict_inode() operations.
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | ovl: setup overlayfs' private bdifs/ | +4 | 1 reply | |
| 2/7 | ovl: mark overlayfs inode dirty when it has upperfs/ fs/ | +4 | 3 replies | |
| 3/7 | ovl: implement overlayfs' own ->write_inode operationfs/ | +21 | 2 replies | |
| 4/7 | ovl: set 'DONTCACHE' flag for overlayfs inodefs/ | +1 | 1 reply | |
| 5/7 | fs: export wait_sb_inodes()fs/ include/ | +3 | 1 reply | |
| 6/7 | ovl: introduce ovl_sync_upper_blockdev()fs/ | +10 | 1 reply | |
| 7/7 | ovl: implement containerized syncfs for overlayfsfs/ | +5 | 3 replies |
Reviews trailers per patch
6 of 7 patches have a Reviewed-by or Acked-by.
| Patch | Jan Kara |
|---|---|
| 1/7 | R-b |
| 2/7 | R-b |
| 3/7 | R-b |
| 4/7 | |
| 5/7 | R-b |
| 6/7 | R-b |
| 7/7 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH V6 0/7] implement containerized syncfs for overlayfs
From: Chengguang Xu <[email protected]>
Current syncfs(2) syscall on overlayfs just calls sync_filesystem() on upper_sb to synchronize whole dirty inodes in upper filesystem regardless of the overlay ownership of the inode. In the use case of container, when multiple containers using the same underlying upper filesystem, it has some shortcomings as below.
(1) Performance
Synchronization is probably heavy because it actually syncs unnecessary inodes for target overlayfs.
(2) Interference
Unplanned synchronization will probably impact IO performance of unrelated container processes on the other overlayfs.
This series try to implement containerized syncfs for overlayfs so that only sync target dirty upper inodes which are belong to specific overlayfs instance. By doing this, it is able to reduce cost of synchronization and will not seriously impact IO performance of unrelated processes.
v1->v2:
- Mark overlayfs' inode dirty itself instead of adding notification mechanism to vfs inode.
v2->v3:
- Introduce overlayfs' extra syncfs wait list to wait target upper inodes in ->sync_fs.
v3->v4:
- Using wait_sb_inodes() to wait syncing upper inodes.
- Mark overlay inode dirty only when having upper inode and VM_SHARED flag in ovl_mmap().
- Check upper i_state after checking upper mmap state
in ovl_write_inode.
v4->v5:
- Add underlying inode dirtiness check after mnt_drop_write().
- Handle both wait/no-wait mode of syncfs(2) in overlayfs' ->sync_fs().
v5->v6:
- Rebase to latest overlayfs-next tree.
- Mark oerlay inode dirty when it has upper instead of marking dirty on modification.
- Trigger dirty page writeback in overlayfs' ->write_inode().
- Mark overlay inode 'DONTCACHE' flag.
- Delete overlayfs' ->writepages() and ->evict_inode() operations.
Chengguang Xu (7):
ovl: setup overlayfs' private bdi
ovl: mark overlayfs inode dirty when it has upper
ovl: implement overlayfs' own ->write_inode operation
ovl: set 'DONTCACHE' flag for overlayfs inode
fs: export wait_sb_inodes()
ovl: introduce ovl_sync_upper_blockdev()
ovl: implement containerized syncfs for overlayfs
fs/fs-writeback.c | 3 ++- fs/overlayfs/inode.c | 5 +++- fs/overlayfs/super.c | 49 ++++++++++++++++++++++++++++++++------- fs/overlayfs/util.c | 1 + include/linux/writeback.h | 1 + 5 files changed, 48 insertions(+), 11 deletions(-)
Signature · 1 line
2.27.0