[folded-merged] ocfs2-nowait-aio-support-v4.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: ocfs2-nowait-aio-support-v4
has been removed from the -mm tree.  Its filename was
     ocfs2-nowait-aio-support-v4.patch

This patch was dropped because it was folded into ocfs2-nowait-aio-support.patch

------------------------------------------------------
From: Gang He <ghe@xxxxxxxx>
Subject: ocfs2-nowait-aio-support-v4

Compare with v3, modify the check condition for nowait in
ocfs2_file_write_iter() function.  second, add direct-io and nowait
combination check in ocfs2_file_read_iter() function.  Compare with v2, do
some modification in ocfs2_overwrite_io() function for
OCFS2_INLINE_DATA_FL case.

Link: http://lkml.kernel.org/r/1516007283-29932-4-git-send-email-ghe@xxxxxxxx
Signed-off-by: Gang He <ghe@xxxxxxxx>
Cc: Mark Fasheh <mfasheh@xxxxxxxxxxx>
Cc: Joel Becker <jlbec@xxxxxxxxxxxx>
Cc: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
Cc: Joseph Qi <jiangqi903@xxxxxxxxx>
Cc: Changwei Ge <ge.changwei@xxxxxxx>
Cc: Jun Piao <piaojun@xxxxxxxxxx>
Cc: alex chen <alex.chen@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/ocfs2/file.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff -puN fs/ocfs2/file.c~ocfs2-nowait-aio-support-v4 fs/ocfs2/file.c
--- a/fs/ocfs2/file.c~ocfs2-nowait-aio-support-v4
+++ a/fs/ocfs2/file.c
@@ -2269,7 +2269,7 @@ static ssize_t ocfs2_file_write_iter(str
 	if (count == 0)
 		return 0;
 
-	if (direct_io && nowait) {
+	if (nowait) {
 		if (!inode_trylock(inode))
 			return -EAGAIN;
 	} else
@@ -2282,7 +2282,7 @@ static ssize_t ocfs2_file_write_iter(str
 	 */
 	rw_level = (!direct_io || full_coherency || append_write);
 
-	if (direct_io && nowait)
+	if (nowait)
 		ret = ocfs2_try_rw_lock(inode, rw_level);
 	else
 		ret = ocfs2_rw_lock(inode, rw_level);
@@ -2402,6 +2402,7 @@ static ssize_t ocfs2_file_read_iter(stru
 	int ret = 0, rw_level = -1, lock_level = 0;
 	struct file *filp = iocb->ki_filp;
 	struct inode *inode = file_inode(filp);
+	int direct_io = iocb->ki_flags & IOCB_DIRECT ? 1 : 0;
 	int nowait = iocb->ki_flags & IOCB_NOWAIT ? 1 : 0;
 
 	trace_ocfs2_file_aio_read(inode, filp, filp->f_path.dentry,
@@ -2417,11 +2418,14 @@ static ssize_t ocfs2_file_read_iter(stru
 		goto bail;
 	}
 
+	if (!direct_io && nowait)
+		return -EOPNOTSUPP;
+
 	/*
 	 * buffered reads protect themselves in ->readpage().  O_DIRECT reads
 	 * need locks to protect pending reads from racing with truncate.
 	 */
-	if (iocb->ki_flags & IOCB_DIRECT) {
+	if (direct_io) {
 		if (nowait)
 			ret = ocfs2_try_rw_lock(inode, 0);
 		else
_

Patches currently in -mm which might be from ghe@xxxxxxxx are

ocfs2-give-an-obvious-tip-for-dismatch-cluster-names.patch
ocfs2-try-a-blocking-lock-before-return-aop_truncated_page.patch
ocfs2-add-trimfs-dlm-lock-resource.patch
ocfs2-add-trimfs-lock-to-avoid-duplicated-trims-in-cluster.patch
ocfs2-add-ocfs2_try_rw_lock-and-ocfs2_try_inode_lock.patch
ocfs2-add-ocfs2_overwrite_io-function.patch
ocfs2-nowait-aio-support.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux