Thread (46 messages) 46 messages, 4 authors, 2021-03-23

Re: [PATCH v4 08/28] netfs: Provide readahead and readpage netfs helpers

From: David Howells <dhowells@redhat.com>
Date: 2021-03-16 11:35:59
Also in: ceph-devel, linux-cifs, linux-fsdevel, linux-mm, lkml
Subsystem: filesystems (vfs and infrastructure), filesystems [netfs library], the rest · Maintainers: Alexander Viro, Christian Brauner, David Howells, Paulo Alcantara, Linus Torvalds

I'm going to make the code generate more information when warning about a
subread reporting having over-read (see attached).

David
---
diff --git a/fs/netfs/read_helper.c b/fs/netfs/read_helper.c
index ce11ca4c32e4..765e88ee132d 100644
--- a/fs/netfs/read_helper.c
+++ b/fs/netfs/read_helper.c
@@ -641,7 +641,10 @@ void netfs_subreq_terminated(struct netfs_read_subrequest *subreq,
 		goto failed;
 	}
 
-	if (WARN_ON(transferred_or_error > subreq->len - subreq->transferred))
+	if (WARN(transferred_or_error > subreq->len - subreq->transferred,
+		 "R%x[%x] %zd > %zu - %zu",
+		 rreq->debug_id, subreq->debug_index,
+		 transferred_or_error, subreq->len, subreq->transferred))
 		transferred_or_error = subreq->len - subreq->transferred;
 
 	subreq->error = 0;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help