diff mbox series

src/append_reader.c: print more info when it reads bad data

Message ID 20201105150543.403712-1-jlayton@kernel.org (mailing list archive)
State New, archived
Headers show
Series src/append_reader.c: print more info when it reads bad data | expand

Commit Message

Jeff Layton Nov. 5, 2020, 3:05 p.m. UTC
When append_reader gets bad data, print the actual and expected values.
This was helpful to me when hunting a failure in generic/069 on ceph
recently.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 src/append_reader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/append_reader.c b/src/append_reader.c
index 6b9e4f68e572..4660268f2f52 100644
--- a/src/append_reader.c
+++ b/src/append_reader.c
@@ -34,7 +34,7 @@  int main(int argc, char **argv)
 		}
 
 		if (d != i) {
-			fprintf(stderr, "bad data, offset = %u", i * 4);
+			fprintf(stderr, "bad data, offset = %u, got %d wanted %d\n", i * 4, d, i);
 			exit(1);
 		}
 	}