[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <2602345.1740576046@warthog.procyon.org.uk>
Date: Wed, 26 Feb 2025 13:20:46 +0000
From: David Howells <dhowells@...hat.com>
To: Christian Brauner <brauner@...nel.org>,
Steve French <stfrench@...rosoft.com>,
Dominique Martinet <asmadeus@...ewreck.org>
cc: dhowells@...hat.com, Ihor Solodrai <ihor.solodrai@...me>,
Eric Van Hensbergen <ericvh@...nel.org>,
Latchesar Ionkov <lucho@...kov.net>,
Christian Schoenebeck <linux_oss@...debyte.com>,
Paulo Alcantara <pc@...guebit.com>, Jeff Layton <jlayton@...nel.org>,
v9fs@...ts.linux.dev, linux-cifs@...r.kernel.org,
netfs@...ts.linux.dev, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] netfs: Fix unbuffered writes
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@...hat.com>
cc: Steve French <stfrench@...rosoft.com>
cc: Ihor Solodrai <ihor.solodrai@...me>
cc: Eric Van Hensbergen <ericvh@...nel.org>
cc: Latchesar Ionkov <lucho@...kov.net>
cc: Dominique Martinet <asmadeus@...ewreck.org>
cc: Christian Schoenebeck <linux_oss@...debyte.com>
cc: Paulo Alcantara <pc@...guebit.com>
cc: Jeff Layton <jlayton@...nel.org>
cc: v9fs@...ts.linux.dev
cc: linux-cifs@...r.kernel.org
cc: netfs@...ts.linux.dev
cc: linux-fsdevel@...r.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) {
Powered by blists - more mailing lists