diff mbox series

[7/8] fsx: fix backwards parameters in complaint about overly long copy

Message ID 162078493928.3302755.17832088383743982289.stgit@magnolia (mailing list archive)
State Accepted
Headers show
Series fstests: miscellaneous fixes | expand

Commit Message

Darrick J. Wong May 12, 2021, 2:02 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

If fsx encounters a situation where copy_file_range reports that it
copied more than it was asked to, we report this as a failure.
Unfortunately, the parameters to the print function are backwards,
leading to this bogus complaint about a short copy:

do_copy_range: asked 28672, copied 24576??

When we really asked to copy 24k but 28k was copied instead.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 ltp/fsx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ltp/fsx.c b/ltp/fsx.c
index 16e75c40..12c2cc33 100644
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -1662,7 +1662,7 @@  do_copy_range(unsigned offset, unsigned length, unsigned dest)
 			prt("copy range: 0x%x to 0x%x at 0x%x\n", offset,
 					offset + length, dest);
 			prt("do_copy_range: asked %u, copied %u??\n",
-					nr, olen);
+					olen, nr);
 			report_failure(161);
 		} else if (nr > 0)
 			olen -= nr;