All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: Pat LaVarre <p.lavarre@ieee.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: zero block writes
Date: Wed, 15 Oct 2003 08:34:24 +1000	[thread overview]
Message-ID: <3F8C79F0.6070105@torque.net> (raw)
In-Reply-To: <1066160907.3501.9.camel@patehci2>

Pat LaVarre wrote:
> $
> $ sg_dd of=/dev/sg0 if=/dev/null bs=2k count=1
> 0+0 records in
> 0+0 records out
> $
> 
> cdb trace tells me this sg utils idiom assaults the device with a zero
> block write, specifically:
> 
> ...
> usb-storage: Command WRITE_10 (10 bytes)
> usb-storage:  2a 00 00 00 00 00 00 00 00 00
> usb-storage: Bulk command S 0x43425355 T 0x1e Trg 0 LUN 0 L 0 F 0 CL 10
> ...
> 
> I wonder if any of you find this sg utils factoid ineffably interesting,
> as I do?

Pat,
I find some bugs "interesting". BTW if "if=/dev/zero"
is used the result is more sane :-)

Also when I tested this on scsi_debug, it complained
about getting a NULL data buffer pointer.

> I know I have a personal history of pain with the scsi folk who dispute
> the t10 claim that the cdb x 0A 00:00:00 00 00 means write out x100
> blocks rather than zero and/or while yet that the cdb x 2A 00
> 00:00:00:00 00 00:00 00 does mean write out zero blocks.
> 
> I know I explicitly wrote code into a revision, at a time beyond the
> original release of pldd, to discard writes of zero bytes quietly,
> rather than passing them thru to the device.
> 
> I know such pass thru's trip over such unit attentions as x 6 29 reset.

A new beta (1.05) should be out tomorrow that fixes this
(I just put one up about 1 hour ago).

Doug Gilbert



  reply	other threads:[~2003-10-14 22:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-14 19:48 zero block writes Pat LaVarre
2003-10-14 22:34 ` Douglas Gilbert [this message]
2003-10-14 23:18   ` Pat LaVarre
2003-10-20 17:55     ` Pat LaVarre
2003-10-20 22:46   ` Pat LaVarre
2003-10-14 22:43 ` Pat LaVarre

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=3F8C79F0.6070105@torque.net \
    --to=dougg@torque.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=p.lavarre@ieee.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.