ocfs2: allocate blocks in direct I/O write
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest7 patches 0 repliesNew
- v37 patches 0 repliesSuperseded
- v27 patches 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 0 of 7 patches | 0 replies | Superseded |
changelog from the cover letter
v4 <- v3:
-- zeroing blocks when O_DIRECT append write is not cluster aligned. -- fallback to buffered I/O if we are appending and concurrent
O_DIRECT writes are allowed.
-- no longer call ocfs2_start_trans with ocfs2_inode_lock, to avoid
possible deadlock.
-- no need call ocfs2_journal_access_di since it will be called in
ocfs2_orphan_add and ocfs2_orphan_del.
-- simplify the ocfs2_orphan_reco_type to two types.
-- fix a deadlock in ocfs2_recover_orphans, and distinguish the new
truncate logic from original recover logic.
-- refactor ocfs2_direct_IO.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | ocfs2: eliminate the static flag of some functionsfs/ fs/ fs/ +1 more | +28 | 0 replies | |
| 2/7 | ocfs2: add two functions of add and remove inode in orphan dirfs/ fs/ fs/ | +157 | 1 reply | |
| 3/7 | ocfs2: add orphan recovery types in ocfs2_recover_orphansfs/ fs/ | +110 | 0 replies | |
| 4/7 | ocfs2: add and remove inode in orphan dir in ocfs2_direct_IOfs/ | +172 | 3 replies | |
| 5/7 | ocfs2: allocate blocks in ocfs2_direct_IO_get_blocksfs/ | +42 | 0 replies | |
| 6/7 | ocfs2: do not fallback to buffer I/O write if appendingfs/ | +4 | 0 replies | |
| 7/7 | ocfs2: do not fallback to buffer I/O write if fill holesfs/ | +42 | 1 reply |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by.
| Patch | Joseph Qi |
|---|---|
| 1/7 | R-b |
| 2/7 | R-b |
| 3/7 | R-b |
| 4/7 | R-b |
| 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 [Ocfs2-devel] [PATCH 0/7 v4] ocfs2: allocate blocks in direct I/O write
Hi all,
Currently in case of O_DIRECT append write (block not allocated yet), ocfs2 will fall back to buffered I/O. This has some disadvantages. Firstly, it is not the behavior as expected. Secondly, it will consume huge page cache, e.g. in mass backup scenario. Thirdly, modern filesystems such as ext4 support this feature.
In this patch set, the direct I/O write doesn't fallback to buffer I/O write any more because the allocate blocks are enabled in direct I/O now.
changelog:
v4 <- v3:
-- zeroing blocks when O_DIRECT append write is not cluster aligned. -- fallback to buffered I/O if we are appending and concurrent
O_DIRECT writes are allowed.
-- no longer call ocfs2_start_trans with ocfs2_inode_lock, to avoid
possible deadlock.
-- no need call ocfs2_journal_access_di since it will be called in
ocfs2_orphan_add and ocfs2_orphan_del.
-- simplify the ocfs2_orphan_reco_type to two types.
-- fix a deadlock in ocfs2_recover_orphans, and distinguish the new
truncate logic from original recover logic.
-- refactor ocfs2_direct_IO.
Any feedbacks are always appreciated.
Thanks,
-- Wang
Weiwei Wang (7)
ocfs2: eliminate the static flag of some functions
ocfs2: add two functions of add and remove inode in orphan dir
ocfs2: add orphan recovery types in ocfs2_recover_orphans
ocfs2: add and remove inode to orphan in ocfs2_direct_IO
ocfs2: allocate blocks in ocfs2_direct_IO_get_blocks
ocfs2: do not fallback to buffer I/O write if appending
ocfs2: do not fallback to buffer I/O write if fill holes
fs/ocfs2/aops.c | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
----
fs/ocfs2/file.c | 104 +++++++++++++++++------------------- fs/ocfs2/file.h | 9 ++++ fs/ocfs2/journal.c | 131 ++++++++++++++++++++++++++++++++++++--------- fs/ocfs2/journal.h | 5 ++ fs/ocfs2/namei.c | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++------ fs/ocfs2/namei.h | 20 ++++++- fs/ocfs2/ocfs2.h | 5 ++ 8 files changed, 555 insertions(+), 107 deletions(-)