From: David Howells <dhowells@redhat.com>
To: Christian Brauner <brauner@kernel.org>,
Steve French <stfrench@microsoft.com>,
Dominique Martinet <asmadeus@codewreck.org>
Cc: dhowells@redhat.com, Ihor Solodrai <ihor.solodrai@pm.me>,
Eric Van Hensbergen <ericvh@kernel.org>,
Latchesar Ionkov <lucho@ionkov.net>,
Christian Schoenebeck <linux_oss@crudebyte.com>,
Paulo Alcantara <pc@manguebit.com>,
Jeff Layton <jlayton@kernel.org>,
v9fs@lists.linux.dev, linux-cifs@vger.kernel.org,
netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] netfs: Fix unbuffered writes
Date: Wed, 26 Feb 2025 13:20:46 +0000 [thread overview]
Message-ID: <2602345.1740576046@warthog.procyon.org.uk> (raw)
Fix netfs_wait_for_request() so that it doesn't check the outcome of a
synchronous unbuffered write and emit error -EIO and a netfs_failure trace
line if the write appears to be short. This will affect both 9p and cifs,
depending on the mount options; it does not affect DIO writes.
This check is a problem because the write side doesn't set rreq->submitted,
but rather ->issued_to (the two ought to be merged as one is superfluous).
This now occurs because the code was generalised from just the read side to
the write side as well.
Fixes: 9dc06eff2097 ("netfs: Fix wait/wake to be consistent about the waitqueue used")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <stfrench@microsoft.com>
cc: Ihor Solodrai <ihor.solodrai@pm.me>
cc: Eric Van Hensbergen <ericvh@kernel.org>
cc: Latchesar Ionkov <lucho@ionkov.net>
cc: Dominique Martinet <asmadeus@codewreck.org>
cc: Christian Schoenebeck <linux_oss@crudebyte.com>
cc: Paulo Alcantara <pc@manguebit.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: v9fs@lists.linux.dev
cc: linux-cifs@vger.kernel.org
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
---
fs/netfs/misc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/netfs/misc.c b/fs/netfs/misc.c
index 6a5a7704e983..77e7f7c79d27 100644
--- a/fs/netfs/misc.c
+++ b/fs/netfs/misc.c
@@ -461,6 +461,7 @@ static ssize_t netfs_wait_for_request(struct netfs_io_request *rreq,
case NETFS_DIO_READ:
case NETFS_DIO_WRITE:
case NETFS_READ_SINGLE:
+ case NETFS_UNBUFFERED_WRITE:
break;
default:
if (rreq->submitted < rreq->len) {
next reply other threads:[~2025-02-26 13:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 13:20 David Howells [this message]
2025-02-26 15:21 ` [PATCH] netfs: Fix unbuffered writes David Howells
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=2602345.1740576046@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=asmadeus@codewreck.org \
--cc=brauner@kernel.org \
--cc=ericvh@kernel.org \
--cc=ihor.solodrai@pm.me \
--cc=jlayton@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=netfs@lists.linux.dev \
--cc=pc@manguebit.com \
--cc=stfrench@microsoft.com \
--cc=v9fs@lists.linux.dev \
/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