summaryrefslogtreecommitdiff
path: root/fs/netfs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2024-03-15 15:15:44 +0000
committerDavid Howells <dhowells@redhat.com>2024-05-01 18:07:38 +0100
commit1ecb146f7cd82e44277de448d4f736b98741f3cb (patch)
tree572036680cd3b0491525b74b48121bb3b2a8e55c /fs/netfs
parentd41ca44c20c3578154f30b07aa85ed4a951f34ab (diff)
netfs, afs: Use writeback retry to deal with alternate keys
Use a hook in the new writeback code's retry algorithm to rotate the keys once all the outstanding subreqs have failed rather than doing it separately on each subreq. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org
Diffstat (limited to 'fs/netfs')
-rw-r--r--fs/netfs/write_collect.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/netfs/write_collect.c b/fs/netfs/write_collect.c
index f14c08bf605d..60112e4b2c5e 100644
--- a/fs/netfs/write_collect.c
+++ b/fs/netfs/write_collect.c
@@ -163,6 +163,13 @@ static void netfs_retry_write_stream(struct netfs_io_request *wreq,
_enter("R=%x[%x:]", wreq->debug_id, stream->stream_nr);
+ if (list_empty(&stream->subrequests))
+ return;
+
+ if (stream->source == NETFS_UPLOAD_TO_SERVER &&
+ wreq->netfs_ops->retry_request)
+ wreq->netfs_ops->retry_request(wreq, stream);
+
if (unlikely(stream->failed))
return;
@@ -182,8 +189,6 @@ static void netfs_retry_write_stream(struct netfs_io_request *wreq,
return;
}
- if (list_empty(&stream->subrequests))
- return;
next = stream->subrequests.next;
do {