From: Douglas Gilbert <dougg@torque.net>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "Moore, Eric" <Eric.Moore@lsi.com>,
"rwheeler@redhat.com" <rwheeler@redhat.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
Jim Meyering <jim@meyering.net>
Subject: Re: tools support for non-512 byte sector sizes
Date: Tue, 29 Jul 2008 15:14:24 -0400 [thread overview]
Message-ID: <488F6C10.2060209@torque.net> (raw)
In-Reply-To: <yq1y73kpl68.fsf@sermon.lab.mkp.net>
Martin K. Petersen wrote:
>>>>>> "Eric" == Moore, Eric <Eric.Moore@lsi.com> writes:
>
> Eric> I was wondering about formatting drives with DIF support??
> Eric> Martin told me he is using sg_format, however it doesn't support
> Eric> type 3 protection format, which has 6 byte application tag.
>
> I have only been testing Type 3 with scsi_debug (which conveniently
> avoids the formatting step).
>
> I doubt we will see any disk drives that support Type 3. The way the
> standard is written, a drive can either do Type 1+2 or Type 1+3. Type
> 2+3 is not a possible combination.
>
> In any case. If you happen to own a Type 3-capable device you format
> it exactly like if it had been a Type 2. I.e. set PINFO=1 and
> RTO_REQ=1 in FORMAT UNIT. sg_format can already do this.
According to sbc3r15.pdf (section 5.2 table 20 page 56)
sg_format is setting the correct bits for type 3 protection.
See the "format cdb" and the "format parameter list" in the
verbose output below).
The appropriate command line invocation is pretty convoluted:
# sg_format --format --pinfo --rto_req --pfu=1 -vvv /dev/sdb
open /dev/sdb with flags=0x802
inquiry cdb: 12 00 00 00 24 00
duration=0 ms
Linux scsi_debug 0004 peripheral_type: disk [0x0]
PROTECT=0
mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
duration=1 ms
mode sense (10): requested 252 bytes but got 28 bytes
mode sense (10): response
00 1a 00 10 00 00 00 08 00 00 40 00 00 00 02 00
01 0a c0 0b f0 00 00 00 05 00 ff ff
Mode Sense (block descriptor) data, prior to changes:
Number of blocks=16384 [0x4000]
Block size=512 [0x200]
A FORMAT will commence in 10 seconds
ALL data on /dev/sdb will be DESTROYED
Press control-C to abort
A FORMAT will commence in 5 seconds
ALL data on /dev/sdb will be DESTROYED
Press control-C to abort
format cdb: 04 d8 00 00 00 00
format parameter list:
01 02 00 00
duration=1 ms
format unit: Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid command operation code
Raw sense data (in hex):
70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00
00 00
Format command not supported
FORMAT failed
Doug Gilbert
prev parent reply other threads:[~2008-07-29 19:14 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-29 17:24 tools support for non-512 byte sector sizes Ric Wheeler
2008-07-29 18:21 ` Alan Cox
2008-07-29 18:55 ` Matthew Wilcox
2008-07-29 21:07 ` Alan Cox
2008-07-29 18:26 ` Matthew Wilcox
2008-07-29 18:37 ` James Bottomley
2008-07-29 18:42 ` Matthew Wilcox
2008-07-29 18:44 ` James Bottomley
2008-07-29 18:50 ` Matthew Wilcox
2008-07-29 19:00 ` James Bottomley
2008-07-29 18:48 ` Martin K. Petersen
2008-07-29 18:54 ` Ric Wheeler
2008-07-29 18:56 ` James Bottomley
2008-07-29 23:41 ` FUJITA Tomonori
2008-07-30 13:51 ` Matt Domsch
2008-07-30 17:16 ` Jim Meyering
2008-07-30 17:29 ` Matt Domsch
2008-07-30 17:24 ` Alan Cox
2008-07-30 18:13 ` Theodore Tso
2008-07-30 18:28 ` Ric Wheeler
2008-07-30 18:45 ` Theodore Tso
2008-08-09 13:21 ` Pavel Machek
2008-08-01 16:11 ` Matthew Wilcox
2008-08-05 16:54 ` Matthew Wilcox
2008-08-05 16:57 ` Matthew Wilcox
2008-08-05 16:57 ` Matt Domsch
2008-07-30 5:51 ` Vladislav Bolkhovitin
2008-07-29 18:41 ` Martin K. Petersen
2008-07-29 21:54 ` Jeff Garzik
2008-07-29 18:43 ` Moore, Eric
2008-07-29 19:03 ` Martin K. Petersen
2008-07-29 19:14 ` Douglas Gilbert [this message]
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=488F6C10.2060209@torque.net \
--to=dougg@torque.net \
--cc=Eric.Moore@lsi.com \
--cc=jim@meyering.net \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=rwheeler@redhat.com \
/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 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).