block/028: check if T10 verification fails
Subsystems (2)
PATCH 1/1 block/028: check if T10 verification fails
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.
--- tests/block/028 | 8 ++++++++ 1 file changed, 8 insertions(+)
tests/block/028 +8 -0
@@ -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"
Signature · 1 line
2.9.5
Quoted 2 lines · Ming Lei
When T10 verification fails, the error code of
BLK_STS_PROTECTIONmay not be propagated to user space, seempage_end_io().
Well, we should probably fix that instead of papering over it..
Until we fix this, I'm okay to have this change in the blktest, if this is breaking any exiting behavior.
Quoted 6 lines · Christoph Hellwig
Quoted 2 lines · Ming Lei
When T10 verification fails, the error code of
BLK_STS_PROTECTIONmay not be propagated to user space, seempage_end_io().Well, we should probably fix that instead of papering over it..
Quoted 2 lines · Chaitanya Kulkarni
Until we fix this, I'm okay to have this change in the blktest, if this is breaking any exiting behavior.
This is a patch for enhancing/fixing block/028 test case, so that we can't hide the kernel issue. Now when the issue is triggered, block/028 still shows 'passed'.
It is nothing do with fix in kernel side.
Even though it is fixed upstream, there may be other old kernel releases which needs to expose the issue.
Even it is fixed completely, sometimes regression may come up again.
Thanks,
Ming
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines · Ming Lei
When T10 verification fails, the error code of
BLK_STS_PROTECTIONmay not be propagated to user space, seempage_end_io().Well, we should probably fix that instead of papering over it..
That might be a big change, and not sure when they can be fixed completely.
This patch at least can expose the issue to user first.
Anyway, CC filesystem guys.
Thanks,
Ming
Quoted 11 lines · Ming Lei
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines · Ming Lei
When T10 verification fails, the error code of
BLK_STS_PROTECTIONmay not be propagated to user space, seempage_end_io().Well, we should probably fix that instead of papering over it..
That might be a big change, and not sure when they can be fixed completely.
This patch at least can expose the issue to user first.
I don't see a patch anywhere ... ?
--D
Quoted 4 lines
Anyway, CC filesystem guys.
Thanks,
Ming
Quoted 6 lines · Darrick J. Wong
Quoted 5 lines · Ming Lei
Quoted 4 lines · Christoph Hellwig
Quoted 2 lines · Ming Lei
When T10 verification fails, the error code of
BLK_STS_PROTECTIONmay not be propagated to user space, seempage_end_io().
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Well, we should probably fix that instead of papering over it..
That might be a big change, and not sure when they can be fixed completely.
This patch at least can expose the issue to user first.
I don't see a patch anywhere ... ?
It is one blktest patch, please see the following link:
https://lore.kernel.org/linux-block/20190427012449.GC178347@magnolia/T/#t
Thanks,
Ming
Quoted 18 lines · Ming Lei
When T10 verification fails, the error code of
BLK_STS_PROTECTIONmay not be propagated to user space, seempage_end_io().So seems the only reliable way for detecting the failure is to check dmesg.
Cc Martin K . Petersen <[email protected]>Signed-off-by Ming Lei <[email protected]>--- tests/block/028 | 8 ++++++++ 1 file changed, 8 insertions(+)tests/block/028 +0
-0@@ -38,6 +38,14 @@ test() { test_pi "$dix" "$dif"
tests/block/028 test() { · line 48
Quoted 10 lines
tests/block/028 +8
-0echo "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
This will also catch messages that didn't occur during the test run. Not a huge deal, but I reworked it to use DMESG_FILTER instead. Thanks!