From: Bernd Schubert <bschubert@ddn.com>
To: linux-fsdevel@vger.kernel.org
Cc: bernd.schubert@fastmail.fm, miklos@szeredi.hu, dsingh@ddn.com,
Bernd Schubert <bschubert@ddn.com>, Hao Xu <howeyxu@tencent.com>
Subject: [PATCH 1/5] fuse: direct IO can use the write-through code path
Date: Thu, 24 Aug 2023 17:05:29 +0200 [thread overview]
Message-ID: <20230824150533.2788317-2-bschubert@ddn.com> (raw)
In-Reply-To: <20230824150533.2788317-1-bschubert@ddn.com>
Direct IO does not benefit from write back cache and it
also avoides another direct IO write code path.
Cc: Hao Xu <howeyxu@tencent.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Dharmendra Singh <dsingh@ddn.com>
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
---
fs/fuse/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 1cdb6327511e..b1b9f2b9a37d 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1307,7 +1307,7 @@ static ssize_t fuse_cache_write_iter(struct kiocb *iocb, struct iov_iter *from)
ssize_t err;
struct fuse_conn *fc = get_fuse_conn(inode);
- if (fc->writeback_cache) {
+ if (fc->writeback_cache && !(iocb->ki_flags & IOCB_DIRECT)) {
/* Update size (EOF optimization) and mode (SUID clearing) */
err = fuse_update_attributes(mapping->host, file,
STATX_SIZE | STATX_MODE);
--
2.39.2
next prev parent reply other threads:[~2023-08-24 15:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 15:05 [PATCH 0/5 v2] fuse direct write consolidation and parallel IO Bernd Schubert
2023-08-24 15:05 ` Bernd Schubert [this message]
2023-08-28 12:00 ` [PATCH 1/5] fuse: direct IO can use the write-through code path Miklos Szeredi
2023-08-24 15:05 ` [PATCH 2/5] fuse: Create helper function if DIO write needs exclusive lock Bernd Schubert
2023-08-28 10:33 ` Miklos Szeredi
2023-08-24 15:05 ` [PATCH 3/5] fuse: Allow parallel direct writes for O_DIRECT Bernd Schubert
2023-08-28 10:42 ` Miklos Szeredi
2023-08-28 14:21 ` Bernd Schubert
2023-08-28 15:15 ` Miklos Szeredi
2023-08-24 15:05 ` [PATCH 4/5] [RFC] fuse: Set and use IOCB_DIRECT when FOPEN_DIRECT_IO is set Bernd Schubert
2023-08-28 11:59 ` Miklos Szeredi
2023-08-28 14:48 ` Bernd Schubert
2023-08-28 15:05 ` Miklos Szeredi
2023-08-29 13:08 ` Bernd Schubert
2023-08-29 13:26 ` Bernd Schubert
2023-08-29 13:52 ` Bernd Schubert
2023-08-28 20:03 ` Bernd Schubert
2023-08-29 7:16 ` Miklos Szeredi
2023-08-24 15:05 ` [PATCH 5/5] fuse: Remove page flush/invaliation in fuse_direct_io Bernd Schubert
2023-08-28 12:01 ` Miklos Szeredi
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=20230824150533.2788317-2-bschubert@ddn.com \
--to=bschubert@ddn.com \
--cc=bernd.schubert@fastmail.fm \
--cc=dsingh@ddn.com \
--cc=howeyxu@tencent.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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;
as well as URLs for NNTP newsgroup(s).