Re: [PATCH 4 of 7] block: bio data integrity support

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Monakhov Dmitri <dmonakhov@...>
Cc: Martin K. Petersen <martin.petersen@...>, <linux-kernel@...>, <linux-scsi@...>
Date: Monday, June 9, 2008 - 11:05 am

>>>>> "DM" == Monakhov Dmitri <dmonakhov@openvz.org> writes:

DM> Seems i've missing something. What is purpose of this black magic?
DM> do you want just express following?  nr_sectors = (len +
DM> bi->tag_size - 1) / bi->tag_size;

Yep.  In the original DIF spec, only 2-byte tags were supported so the
check for an odd length was a fast and elegant solution.  But now that
I implemented Type 3 which has 6 bytes of tag space that's an invalid
assumption.  Fixed.



DM> Why here and later sector_size == 4096 is so special, what about
DM> 1k and 2k sect_sz? Do you want just transform value from 512 to
DM> bi->sectors_size?

Well, so only 512-byte DIF storage devices are currently available.
The whole industry is in the process of transitioning to 4KB sectors.
There will be no DIF devices with 1KB or 2KB sectors.

And even as it stands it's unclear that 4KB sectors are going to look
like they do in the current version of the spec.  It's going to be an
interoperability nightmare as it is now as the tag is attached to the
hardware sector size.  This means that it's still only 8 bytes of DIF
for a device with 4KB sectors (IOW, 4104 bytes and not 4160).  That
means that *two* protection buffers would have to be generated for -
say - a mirror with heterogeneous sector sizes.  And tagging won't
work as there's not the same space available for both drives of the
mirror.

The tag space problem also causes issues with RAID arrays exporting
512 byte sectors to the host but using drives with 4KB sectors in the
back.  Where is the array going to store the tags for the last 7 512
byte sectors?

So 4KB vs. DIF is up in the air at this point.  The current checks are
there because I've been messing with 4KB sector devices for other
reasons.  And technically they are in accordance with the current
spec.

-- 
Martin K. Petersen	Oracle Linux Engineering

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0 of 7] Block/SCSI Data Integrity Support, Martin K. Petersen, (Sat Jun 7, 12:55 am)
Re: [PATCH 0 of 7] Block/SCSI Data Integrity Support, Jeff Moyer, (Tue Jun 10, 10:41 am)
Re: [PATCH 0 of 7] Block/SCSI Data Integrity Support, Martin K. Petersen, (Tue Jun 10, 11:28 am)
Re: [PATCH 0 of 7] Block/SCSI Data Integrity Support, Mike Snitzer, (Thu Jul 17, 9:55 am)
Re: [PATCH 0 of 7] Block/SCSI Data Integrity Support, Martin K. Petersen, (Thu Jul 17, 11:35 am)
Re: [PATCH 0 of 7] Block/SCSI Data Integrity Support, Jeff Moyer, (Tue Jun 10, 2:49 pm)
Re: [PATCH 0 of 7] Block/SCSI Data Integrity Support, Martin K. Petersen, (Tue Jun 10, 4:47 pm)
Re: [PATCH 0 of 7] Block/SCSI Data Integrity Support, Jeff Moyer, (Tue Jun 10, 4:53 pm)
[PATCH 7 of 7] Support for SCSI disk (SBC) Data Integrity Fi..., Martin K. Petersen, (Sat Jun 7, 12:55 am)
[PATCH 5 of 7] block: Block/request layer data integrity sup..., Martin K. Petersen, (Sat Jun 7, 12:55 am)
Re: [PATCH 5 of 7] block: Block/request layer data integrity..., Martin K. Petersen, (Mon Jun 9, 11:06 am)
[PATCH 4 of 7] block: bio data integrity support, Martin K. Petersen, (Sat Jun 7, 12:55 am)
Re: [PATCH 4 of 7] block: bio data integrity support, Jeff Moyer, (Tue Jun 10, 4:52 pm)
Re: [PATCH 4 of 7] block: bio data integrity support, Martin K. Petersen, (Wed Jun 11, 12:05 am)
Re: [PATCH 4 of 7] block: bio data integrity support, Jeff Moyer, (Wed Jun 11, 1:41 pm)
Re: [PATCH 4 of 7] block: bio data integrity support, Monakhov Dmitri, (Sat Jun 7, 10:45 am)
Re: [PATCH 4 of 7] block: bio data integrity support, Martin K. Petersen, (Mon Jun 9, 11:05 am)
[PATCH 6 of 7] scsi: Support devices with protection informa..., Martin K. Petersen, (Sat Jun 7, 12:55 am)
[PATCH 1 of 7] lib: Add support for the T10 Data Integrity F..., Martin K. Petersen, (Sat Jun 7, 12:55 am)
[PATCH 2 of 7] block: Globalize bio_set and bio_vec_slab, Martin K. Petersen, (Sat Jun 7, 12:55 am)
[PATCH 3 of 7] block: Find bio sector offset given idx and o..., Martin K. Petersen, (Sat Jun 7, 12:55 am)
Re: [PATCH 3 of 7] block: Find bio sector offset given idx a..., Martin K. Petersen, (Mon Jun 9, 12:15 pm)