linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block/028: check if T10 verification fails
@ 2019-04-26  2:39 Ming Lei
  2019-04-26 14:57 ` Christoph Hellwig
  2019-05-06 20:02 ` Omar Sandoval
  0 siblings, 2 replies; 8+ messages in thread
From: Ming Lei @ 2019-04-26  2:39 UTC (permalink / raw)
  To: Omar Sandoval; +Cc: linux-block, Ming Lei, Martin K . Petersen

When T10 verification fails, the error code of BLK_STS_PROTECTION
may not be propagated to user space, see mpage_end_io().

So seems the only reliable way for detecting the failure is to
check dmesg.

Cc: Martin K . Petersen <martin.petersen@oracle.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 tests/block/028 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/block/028 b/tests/block/028
index 7bee691c0515..a0ab9ff208db 100755
--- a/tests/block/028
+++ b/tests/block/028
@@ -38,6 +38,14 @@ test() {
 			test_pi "$dix" "$dif"
 			echo "Test(dix:$dix dif:$dif) complete"
 		done
+		if dmesg | grep -q "guard tag error at sector"; then
+			echo "Fail"
+			break
+		fi
+		if dmesg | grep -q "ref tag error at location"; then
+			echo "Fail"
+			break
+		fi
 	done
 
 	rm -f "$FULL"
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-05-06 20:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-26  2:39 [PATCH] block/028: check if T10 verification fails Ming Lei
2019-04-26 14:57 ` Christoph Hellwig
2019-04-26 18:24   ` Chaitanya Kulkarni
2019-04-26 23:13     ` Ming Lei
2019-04-26 22:16   ` Ming Lei
2019-04-27  1:24     ` Darrick J. Wong
2019-04-27  3:29       ` Ming Lei
2019-05-06 20:02 ` Omar Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).