Skip to content

ocfs2: fix ocfs2 direct io code patch to support sparse file and data ordering semantics

Ryan Ding ocfs2-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8ocfs2: add ocfs2_write_type_t type to identify the caller of writefs/ocfs2/aops.c fs/ocfs2/aops.h fs/ocfs2/mmap.c+22 -130 replies
2/8ocfs2: use c_new to indicate newly allocated extentsfs/ocfs2/aops.c+12 -100 replies
3/8ocfs2: test target page before change itfs/ocfs2/aops.c+26 -60 replies
4/8ocfs2: do not change i_size in write_end for direct iofs/ocfs2/aops.c+46 -330 replies
5/8ocfs2: return the physical address in ocfs2_write_clusterfs/ocfs2/aops.c+13 -150 replies
6/8ocfs2: record UNWRITTEN extents when populate write descfs/ocfs2/aops.c fs/ocfs2/inode.c fs/ocfs2/inode.h +1 more+106 -50 replies
7/8ocfs2: fix sparse file & data ordering issue in direct io.fs/ocfs2/aops.c+342 -5090 replies
8/8ocfs2: code clean up for direct iofs/ocfs2/file.c fs/ocfs2/ocfs2_trace.h+10 -1440 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchJunxiao Bi
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Ocfs2-devel] [PATCH 0/8] ocfs2: fix ocfs2 direct io code patch to support sparse file and data ordering semantics

The idea is to use buffer io(more precisely use the interface ocfs2_write_begin_nolock & ocfs2_write_end_nolock) to do the zero work beyond block size. And clear UNWRITTEN flag until direct io data has been written to disk, which can prevent data corruption when system crashed during direct write.

And we will also archive a better performance:
eg. dd direct write new file with block size 4KB:
before this patch:
2.5 MB/s
after this patch:
66.4 MB/s

----------------------------------------------------------------
Ryan Ding (8):
ocfs2: add ocfs2_write_type_t type to identify the caller of write
ocfs2: use c_new to indicate newly allocated extents
ocfs2: test target page before change it
ocfs2: do not change i_size in write_end for direct io
ocfs2: return the physical address in ocfs2_write_cluster
ocfs2: record UNWRITTEN extents when populate write desc
ocfs2: fix sparse file & data ordering issue in direct io.
ocfs2: code clean up for direct io

 fs/ocfs2/aops.c        | 1118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------
 fs/ocfs2/aops.h        |   11 +-
 fs/ocfs2/file.c        |  138 +---------------------
 fs/ocfs2/inode.c       |    3 +
 fs/ocfs2/inode.h       |    3 + 
 fs/ocfs2/mmap.c        |    4 +-
 fs/ocfs2/ocfs2_trace.h |   16 +-- 
 fs/ocfs2/super.c       |    1 +
 8 files changed, 568 insertions(+), 726 deletions(-)