From: WeiWei Wang <wangww631@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 0/7 v4] ocfs2: allocate blocks in direct I/O write
Date: Sat, 11 Oct 2014 20:23:59 +0800 [thread overview]
Message-ID: <5439215F.2020709@huawei.com> (raw)
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(-)
reply other threads:[~2014-10-11 12:23 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=5439215F.2020709@huawei.com \
--to=wangww631@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox