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

* Re: [PATCH] block/028: check if T10 verification fails
  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 22:16   ` Ming Lei
  2019-05-06 20:02 ` Omar Sandoval
  1 sibling, 2 replies; 8+ messages in thread
From: Christoph Hellwig @ 2019-04-26 14:57 UTC (permalink / raw)
  To: Ming Lei; +Cc: Omar Sandoval, linux-block, Martin K . Petersen

On Fri, Apr 26, 2019 at 10:39:37AM +0800, Ming Lei wrote:
> When T10 verification fails, the error code of BLK_STS_PROTECTION
> may not be propagated to user space, see mpage_end_io().

Well, we should probably fix that instead of papering over it..

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

* Re: [PATCH] block/028: check if T10 verification fails
  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
  1 sibling, 1 reply; 8+ messages in thread
From: Chaitanya Kulkarni @ 2019-04-26 18:24 UTC (permalink / raw)
  To: Christoph Hellwig, Ming Lei
  Cc: Omar Sandoval, linux-block@vger.kernel.org, Martin K . Petersen

Until we fix this, I'm okay to have this change in the blktest, if this 
is breaking any exiting behavior.

On 4/26/19 7:57 AM, Christoph Hellwig wrote:
> On Fri, Apr 26, 2019 at 10:39:37AM +0800, Ming Lei wrote:
>> When T10 verification fails, the error code of BLK_STS_PROTECTION
>> may not be propagated to user space, see mpage_end_io().
> 
> Well, we should probably fix that instead of papering over it..
> 


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

* Re: [PATCH] block/028: check if T10 verification fails
  2019-04-26 14:57 ` Christoph Hellwig
  2019-04-26 18:24   ` Chaitanya Kulkarni
@ 2019-04-26 22:16   ` Ming Lei
  2019-04-27  1:24     ` Darrick J. Wong
  1 sibling, 1 reply; 8+ messages in thread
From: Ming Lei @ 2019-04-26 22:16 UTC (permalink / raw)
  To: Christoph Hellwig, Alexander Viro, linux-fsdevel
  Cc: Omar Sandoval, linux-block, Martin K . Petersen

On Fri, Apr 26, 2019 at 07:57:11AM -0700, Christoph Hellwig wrote:
> On Fri, Apr 26, 2019 at 10:39:37AM +0800, Ming Lei wrote:
> > When T10 verification fails, the error code of BLK_STS_PROTECTION
> > may not be propagated to user space, see mpage_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

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

* Re: [PATCH] block/028: check if T10 verification fails
  2019-04-26 18:24   ` Chaitanya Kulkarni
@ 2019-04-26 23:13     ` Ming Lei
  0 siblings, 0 replies; 8+ messages in thread
From: Ming Lei @ 2019-04-26 23:13 UTC (permalink / raw)
  To: Chaitanya Kulkarni
  Cc: Christoph Hellwig, Omar Sandoval, linux-block@vger.kernel.org,
	Martin K . Petersen

On Fri, Apr 26, 2019 at 06:24:08PM +0000, Chaitanya Kulkarni wrote:
> 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

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

* Re: [PATCH] block/028: check if T10 verification fails
  2019-04-26 22:16   ` Ming Lei
@ 2019-04-27  1:24     ` Darrick J. Wong
  2019-04-27  3:29       ` Ming Lei
  0 siblings, 1 reply; 8+ messages in thread
From: Darrick J. Wong @ 2019-04-27  1:24 UTC (permalink / raw)
  To: Ming Lei
  Cc: Christoph Hellwig, Alexander Viro, linux-fsdevel, Omar Sandoval,
	linux-block, Martin K . Petersen

On Sat, Apr 27, 2019 at 06:16:32AM +0800, Ming Lei wrote:
> On Fri, Apr 26, 2019 at 07:57:11AM -0700, Christoph Hellwig wrote:
> > On Fri, Apr 26, 2019 at 10:39:37AM +0800, Ming Lei wrote:
> > > When T10 verification fails, the error code of BLK_STS_PROTECTION
> > > may not be propagated to user space, see mpage_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

> Anyway, CC filesystem guys.
> 
> Thanks, 
> Ming

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

* Re: [PATCH] block/028: check if T10 verification fails
  2019-04-27  1:24     ` Darrick J. Wong
@ 2019-04-27  3:29       ` Ming Lei
  0 siblings, 0 replies; 8+ messages in thread
From: Ming Lei @ 2019-04-27  3:29 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Christoph Hellwig, Alexander Viro, linux-fsdevel, Omar Sandoval,
	linux-block, Martin K . Petersen

On Fri, Apr 26, 2019 at 06:24:49PM -0700, Darrick J. Wong wrote:
> On Sat, Apr 27, 2019 at 06:16:32AM +0800, Ming Lei wrote:
> > On Fri, Apr 26, 2019 at 07:57:11AM -0700, Christoph Hellwig wrote:
> > > On Fri, Apr 26, 2019 at 10:39:37AM +0800, Ming Lei wrote:
> > > > When T10 verification fails, the error code of BLK_STS_PROTECTION
> > > > may not be propagated to user space, see mpage_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 ... ?

It is one blktest patch, please see the following link:

https://lore.kernel.org/linux-block/20190427012449.GC178347@magnolia/T/#t

Thanks,
Ming

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

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

On Fri, Apr 26, 2019 at 10:39:37AM +0800, Ming Lei wrote:
> 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

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!

^ permalink raw reply	[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).