linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/1] sd_dif: problem with verify of type 1 protection information (PI)
@ 2013-04-18  9:55 Jeremy Higdon
  2013-04-25  1:50 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Higdon @ 2013-04-18  9:55 UTC (permalink / raw)
  To: linux-scsi; +Cc: mdr

It appears to me that there is a problem with handling of type 1 protection information.

It is considering a logical block reference tag of 0xffffffff to be an error,
but it is actually valid any time ((lba & 0xffffffff) == 0xffffffff) [for
example, 2TiB-1, 4TiB-1, 6TiB-1, etc.].

I'm going by what's written in 4.18.3 of SBC3, where there doesn't appear
to be any invalid value for the reference tag.

Signed-off-by: Jeremy Higdon <jeremy@sgi.com>


 sd_dif.c |    8 --------
 1 file changed, 8 deletions(-)


--- a/drivers/scsi/sd_dif.c	2013-04-14 17:45:16.000000000 -0700
+++ b/drivers/scsi/sd_dif.c	2013-04-18 02:36:27.000000000 -0700
@@ -93,14 +93,6 @@ static int sd_dif_type1_verify(struct bl
 		if (sdt->app_tag == 0xffff)
 			return 0;
 
-		/* Bad ref tag received from disk */
-		if (sdt->ref_tag == 0xffffffff) {
-			printk(KERN_ERR
-			       "%s: bad phys ref tag on sector %lu\n",
-			       bix->disk_name, (unsigned long)sector);
-			return -EIO;
-		}
-
 		if (be32_to_cpu(sdt->ref_tag) != (sector & 0xffffffff)) {
 			printk(KERN_ERR
 			       "%s: ref tag error on sector %lu (rcvd %u)\n",

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

* Re: [patch 1/1] sd_dif: problem with verify of type 1 protection information (PI)
  2013-04-18  9:55 [patch 1/1] sd_dif: problem with verify of type 1 protection information (PI) Jeremy Higdon
@ 2013-04-25  1:50 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2013-04-25  1:50 UTC (permalink / raw)
  To: Jeremy Higdon; +Cc: linux-scsi, mdr

>>>>> "Jeremy" == Jeremy Higdon <jeremy@sgi.com> writes:

Jeremy> It appears to me that there is a problem with handling of type 1
Jeremy> protection information.  It is considering a logical block
Jeremy> reference tag of 0xffffffff to be an error, but it is actually
Jeremy> valid any time ((lba & 0xffffffff) == 0xffffffff) [for example,
Jeremy> 2TiB-1, 4TiB-1, 6TiB-1, etc.].

Yes, that's a bogus check. It's actually one I put in way back to debug
a faulty device and forgot to back out. My DIF test tooling does not
rely on the block layer generate/verify functions so I never noticed.

The same issue was reported recently by Keith Busch.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2013-04-25  1:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18  9:55 [patch 1/1] sd_dif: problem with verify of type 1 protection information (PI) Jeremy Higdon
2013-04-25  1:50 ` Martin K. Petersen

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).