From: WeiWei Wang <wangww631@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 6/7 v2] ocfs2: do not fallback to buffer I/O write if appending
Date: Tue, 23 Sep 2014 17:14:37 +0800 [thread overview]
Message-ID: <542139FD.7010801@huawei.com> (raw)
After enable block allocation in direct-io write now, we don't fallback to buffer I/O
write in append write sitiaion any more. If the O_DIRECT flag is taken, we use direct-io.
Signed-off-by: Weiwei Wang <wangww631@huawei.com>
---
fs/ocfs2/aops.c | 4 ----
fs/ocfs2/file.c | 11 -----------
2 files changed, 15 deletions(-)
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 1e6de00..859dd7f 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -663,10 +663,6 @@ static ssize_t ocfs2_direct_IO(int rw,
if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL)
return 0;
- /* Fallback to buffered I/O if we are appending. */
- if (i_size_read(inode) <= offset)
- return 0;
-
if (rw == WRITE) {
loff_t final_size = offset + count;
/*
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 964d442..a3b0efb 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2193,17 +2193,6 @@ static int ocfs2_prepare_inode_for_write(struct file *file,
}
/*
- * Allowing concurrent direct writes means
- * i_size changes wouldn't be synchronized, so
- * one node could wind up truncating another
- * nodes writes.
- */
- if (end > i_size_read(inode)) {
- *direct_io = 0;
- break;
- }
-
- /*
* We don't fill holes during direct io, so
* check for them here. If any are found, the
* caller will have to retake some cluster
-- 1.8.4.3
reply other threads:[~2014-09-23 9:14 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=542139FD.7010801@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 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.