From: Douglas Gilbert <dgilbert@interlog.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Sagi Grimberg <sagig@dev.mellanox.co.il>,
Sagi Grimberg <sagig@mellanox.com>,
"Nicholas A. Bellinger" <nab@daterainc.com>,
target-devel <target-devel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>,
Or Gerlitz <ogerlitz@mellanox.com>,
Nicholas Bellinger <nab@linux-iscsi.org>
Subject: Re: [PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16
Date: Sun, 12 Jan 2014 13:53:29 -0500 [thread overview]
Message-ID: <52D2E4A9.7010004@interlog.com> (raw)
In-Reply-To: <yq1ppnxnmj4.fsf@sermon.lab.mkp.net>
On 14-01-12 12:21 PM, Martin K. Petersen wrote:
>>>>>> "Doug" == Douglas Gilbert <dgilbert@interlog.com> writes:
>
>>> 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.
>
> Doug> Some observations: I haven't seen any disks pre-formatted with
> Doug> T10-protection, they usually come pre-formatted without
> Doug> T10-protection.
>
> Depends where you buy them. All the drives we ship arrive formatted with
> T10 PI from the manufacturer.
>
> However, nobody expects you to format a LUN on an array. When you create
> a LUN on a PI-capable storage array, T10 PI is a storage management
> interface option just like size, RAID level, etc. Upon creation, arrays
> zero out newly provisioned LUN blocks and write parity, etc. If PI is
> enabled on a LUN, blocks are written with all zeroes in the data block
> and all ones in the trailing PI tuple. This is all part of the regular
> LUN setup procedure.
>
> In any case. The usage model is that you never format a disk unless you
> are a tinkerer and bought a retail SAS drive at Fry's. Drives will be
> delivered by your server vendor formatted with PI and ready to go.
Only tinkerers would contribute to something like
the scsi_debug driver. After all, the pros could
rely on their T10 compliant vendor equipment :-)
And you are right, I do like to test sg_format
against something real. Perhaps sg_format is the
utility those server vendors use. Another
tinkerer called James Bottomley wrote the original
sg_format code, according to my notes.
> If you use a non-disk storage device, whether or not to enable PI is
> part of the LUN provisioning procedure (array management console, RAID
> or flash controller card config utility, etc.)
>
> Doug> So a tentative READ, for example checking if a disk has a
> Doug> partition table, could be preceded by a GET LBA STATUS
> Doug> command. IMO, if provisioning is enabled, LBPRZ=0 then the GET LBA
> Doug> STATUS command should be mandatory. Otherwise a tentative READ is
> Doug> a lucky dip.
>
> It's perfectly valid to do a legacy/unprotected READ from a T10 PI
> device. Doesn't matter whether the blocks are unwritten or not.
Ah, the current SBC-3 draft (sbc3r36.pdf) does say if one
does a READ from a disk with logical provisioning enabled
and LBPRZ=0 then the block data is "vendor specific" and
the PI, if any, is all 0xff bytes. That last bit was added
in sbc3r34.pdf (and it was "any value" prior to that).
Back to the original question, I don't think Sagi was
asking if it was valid to do a legacy/unprotected READ,
it was what to expect with a protected READ on
unwritten blocks:
> 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?
So the precise answer is: the PI will be all 0xff bytes,
unless logical provisioning is enabled, LBPRZ=0 and the
device's compliance predates sbc3r34.pdf (November 2012).
Doug Gilbert
next prev parent reply other threads:[~2014-01-12 18:53 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 20:15 [PATCH 00/14] target: Initial support for DIF Type1+Type3 emulation Nicholas A. Bellinger
2014-01-08 20:15 ` [PATCH 01/14] target: Add DIF related base definitions Nicholas A. Bellinger
2014-01-09 10:58 ` Sagi Grimberg
2014-01-08 20:15 ` [PATCH 02/14] target: Add DIF CHECK_CONDITION ASC/ASCQ exception cases Nicholas A. Bellinger
2014-01-09 10:43 ` Sagi Grimberg
2014-01-10 6:53 ` Nicholas A. Bellinger
2014-01-14 7:44 ` Sagi Grimberg
2014-01-14 8:53 ` Nicholas A. Bellinger
2014-01-14 10:56 ` Sagi Grimberg
2014-01-08 20:15 ` [PATCH 03/14] target/sbc: Add sbc_check_prot + update sbc_parse_cdb for DIF Nicholas A. Bellinger
2014-01-09 14:58 ` Sagi Grimberg
2014-01-10 7:04 ` Nicholas A. Bellinger
2014-01-12 11:59 ` Sagi Grimberg
2014-01-13 19:23 ` Nicholas A. Bellinger
2014-01-10 20:30 ` Martin K. Petersen
2014-01-08 20:15 ` [PATCH 04/14] target/sbc: Add DIF TYPE1+TYPE3 read/write verify emulation Nicholas A. Bellinger
2014-01-08 20:15 ` [PATCH 05/14] target/spc: Add protection bit to standard INQUIRY output Nicholas A. Bellinger
2014-01-10 20:34 ` Martin K. Petersen
2014-01-08 20:15 ` [PATCH 06/14] target/spc: Add protection related bits to INQUIRY EVPD=0x86 Nicholas A. Bellinger
2014-01-10 20:35 ` Martin K. Petersen
2014-01-08 20:15 ` [PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16 Nicholas A. Bellinger
2014-01-09 10:24 ` Sagi Grimberg
2014-01-10 6:21 ` Nicholas A. Bellinger
2014-01-10 19:50 ` Andy Grover
2014-01-10 20:15 ` Nicholas A. Bellinger
2014-01-10 20:46 ` Martin K. Petersen
2014-01-12 11:49 ` Sagi Grimberg
2014-01-10 20:40 ` Martin K. Petersen
2014-01-10 20:39 ` Martin K. Petersen
2014-01-12 12:13 ` Sagi Grimberg
2014-01-12 12:33 ` Martin K. Petersen
2014-01-12 12:47 ` Sagi Grimberg
2014-01-12 12:53 ` Martin K. Petersen
2014-01-12 16:37 ` Douglas Gilbert
2014-01-12 17:21 ` Martin K. Petersen
2014-01-12 18:53 ` Douglas Gilbert [this message]
2014-01-13 16:33 ` Sagi Grimberg
2014-01-12 12:13 ` Sagi Grimberg
2014-01-10 20:37 ` Martin K. Petersen
2014-01-08 20:15 ` [PATCH 08/14] target/spc: Expose ATO bit in control mode page Nicholas A. Bellinger
2014-01-10 20:57 ` Martin K. Petersen
2014-01-08 20:15 ` [PATCH 09/14] target/configfs: Expose protection device attributes Nicholas A. Bellinger
2014-01-09 11:01 ` Sagi Grimberg
2014-01-10 7:00 ` Nicholas A. Bellinger
2014-01-12 11:56 ` Sagi Grimberg
2014-01-10 21:01 ` Martin K. Petersen
2014-01-12 12:18 ` Sagi Grimberg
2014-01-12 12:43 ` Martin K. Petersen
2014-01-12 12:52 ` Sagi Grimberg
2014-01-13 18:30 ` Nicholas A. Bellinger
2014-01-13 18:52 ` James Bottomley
2014-01-13 19:27 ` Nicholas A. Bellinger
2014-01-13 19:43 ` James Bottomley
2014-01-13 20:19 ` Martin K. Petersen
2014-01-13 20:24 ` James Bottomley
2014-01-13 20:30 ` Martin K. Petersen
2014-01-08 20:15 ` [PATCH 10/14] target: Add protection SGLs to target_submit_cmd_map_sgls Nicholas A. Bellinger
2014-01-08 20:15 ` [PATCH 11/14] target/rd: Refactor rd_build_device_space + rd_release_device_space Nicholas A. Bellinger
2014-01-08 20:15 ` [PATCH 12/14] target/rd: Add support for protection SGL setup + release Nicholas A. Bellinger
2014-01-08 20:15 ` [PATCH 13/14] target/rd: Add DIF protection into rd_execute_rw Nicholas A. Bellinger
2014-01-09 10:32 ` Sagi Grimberg
2014-01-10 6:52 ` Nicholas A. Bellinger
2014-01-12 11:53 ` Sagi Grimberg
2014-01-13 19:22 ` Nicholas A. Bellinger
2014-01-10 21:06 ` Martin K. Petersen
2014-01-12 12:23 ` Sagi Grimberg
2014-01-08 20:15 ` [PATCH 14/14] tcm_loop: Enable DIF/DIX modes in SCSI host LLD Nicholas A. Bellinger
2014-01-10 21:09 ` Martin K. Petersen
2014-01-13 18:45 ` Nicholas A. Bellinger
2014-01-13 20:08 ` Martin K. Petersen
2014-01-10 2:00 ` [PATCH 00/14] target: Initial support for DIF Type1+Type3 emulation Martin K. Petersen
2014-01-10 5:57 ` Nicholas A. Bellinger
2014-01-15 18:03 ` sagi grimberg
2014-01-15 21:55 ` Nicholas A. Bellinger
2014-01-16 1:42 ` Martin K. Petersen
2014-01-16 2:32 ` Nicholas A. Bellinger
2014-01-16 3:04 ` Martin K. Petersen
2014-01-16 7:45 ` sagi grimberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D2E4A9.7010004@interlog.com \
--to=dgilbert@interlog.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nab@daterainc.com \
--cc=nab@linux-iscsi.org \
--cc=ogerlitz@mellanox.com \
--cc=sagig@dev.mellanox.co.il \
--cc=sagig@mellanox.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.