[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230531144006.7307-1-frank.li@vivo.com>
Date: Wed, 31 May 2023 22:40:06 +0800
From: Yangtao Li <frank.li@...o.com>
To: Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <chao@...nel.org>
Cc: Yangtao Li <frank.li@...o.com>, Lu Hongfei <luhongfei@...o.com>,
linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: [PATCH] f2fs: enable nowait async buffered writes
This adds the async buffered write support to f2fs,
the following is the relevant test data.
iodepth | 1 | 2 | 4 | 8 | 16 |
before(M/s) | 1012 | 1133 | 894 | 981 | 866 |
after(M/s) | 1488 | 1896 | 2081 | 2188 | 2207 |
Signed-off-by: Lu Hongfei <luhongfei@...o.com>
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
fs/f2fs/file.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 23c68ee946e5..4faf2c04e325 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -546,7 +546,7 @@ static int f2fs_file_open(struct inode *inode, struct file *filp)
if (err)
return err;
- filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC;
+ filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC | FMODE_BUF_WASYNC;
return dquot_file_open(inode, filp);
}
@@ -4515,9 +4515,6 @@ static ssize_t f2fs_buffered_write_iter(struct kiocb *iocb,
struct inode *inode = file_inode(file);
ssize_t ret;
- if (iocb->ki_flags & IOCB_NOWAIT)
- return -EOPNOTSUPP;
-
current->backing_dev_info = inode_to_bdi(inode);
ret = generic_perform_write(iocb, from);
current->backing_dev_info = NULL;
--
2.39.0
Powered by blists - more mailing lists