lkml.org 
[lkml]   [2014]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16
On 14-01-12 07:13 AM, Sagi Grimberg wrote:
> On 1/10/2014 10:39 PM, Martin K. Petersen wrote:
>>>>>>> "Sagi" == Sagi Grimberg <sagig@mellanox.com> writes:
>> Sagi> What about FORMAT_UNIT emulation? The backstore protection
>> Sagi> configuration is done at the target side via configfs/targetcli,
>>
>> I don't know of any non-disk devices that actually implement FORMAT
>> UNIT. Usually such configuration is done using the array management
>> interface.
>>
>
> Hmm,
>
> So this takes me to a corner I still don't understand, if a LUN is pre-formatted
> as T10-protected, what happens to unwritten blocks read?
> I mean, SCSI login executes some reads from sevel LBAs which will probably fail
> as blocks are unwritten.

Some observations: I haven't seen any disks pre-formatted
with T10-protection, they usually come pre-formatted without
T10-protection. Seeing it can take 10 hours plus to re-format
a big disk with T10-protection, it is not a bad idea though.

After formatting with T10-protection blocks seem to read as
zeros and the PI as all 0xff_s. [The blocks full of zeros may
have been the previous state.] Provisioning might come into
play, if so it makes sense for a FORMAT UNIT to leave all
blocks unmapped. In that case you should check the LBPRZ bit
and hope that it is set (found in READ CAPACITY(16) and the
Logical block provisioning VPD page). Also if provisioning
is in use, the GET LBA STATUS command will tell you if a
block is unmapped (although I don't have any disks that
support that command). So a tentative READ, for example
checking if a disk has a partition table, could be preceded
by a GET LBA STATUS command. IMO, if provisioning is enabled,
LBPRZ=0 then the GET LBA STATUS command should be mandatory.
Otherwise a tentative READ is a lucky dip.


Rob Elliott is trying to push the "feature set" idea used by
the ATA command set, into the SCSI command set. He doesn't
seem to have got much traction at T10 yet. Feature sets seem
to give vendors clearer guidance on what they should implement
to properly support new features. Much pain and bloat is
caused to the Linux SCSI subsystem (and other OSes) by vendors
who half implement new features.

Doug Gilbert



\
 
 \ /
  Last update: 2014-01-12 18:01    [W:2.055 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site