All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 0/7 v5] ocfs2: support append O_DIRECT write
Date: Tue, 28 Oct 2014 20:59:58 +0800	[thread overview]
Message-ID: <544F934E.4010303@huawei.com> (raw)

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.

                 reply	other threads:[~2014-10-28 12:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=544F934E.4010303@huawei.com \
    --to=joseph.qi@huawei.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.