All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 0/7 v5] ocfs2: support append O_DIRECT write
@ 2014-10-28 12:59 Joseph Qi
  0 siblings, 0 replies; only message in thread
From: Joseph Qi @ 2014-10-28 12:59 UTC (permalink / raw)
  To: ocfs2-devel

Currently in case of append O_DIRECT 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:
v5 <- v4:
 -- take Andrew's advice of using do_div() instead of mod(%).
 -- using ocfs2_bytes_to_clusters instead of ocfs2_clusters_for_bytes,
    because we need the floor when calculate v_cpos, not roof.
 -- call __blockdev_direct_IO instead of blockdev_direct_IO in
    ocfs2_direct_IO_write to pass end_io function.
 -- do not override the return value of __blockdev_direct_IO.
 -- after calling generic_file_direct_write, *ppos is already changed,
    so do not change it again in ocfs2_file_write_iter.
 -- fix the issue when do append O_DIRECT write and unlink/rename
    concurrently.

Any feedback are always appreciated.
Thanks.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-28 12:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 12:59 [Ocfs2-devel] [PATCH 0/7 v5] ocfs2: support append O_DIRECT write Joseph Qi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.