public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: dgilbert@interlog.com
Cc: Eric Sandeen <sandeen@redhat.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi_debug: add TPRZ support
Date: Tue, 24 Aug 2010 15:22:09 -0400	[thread overview]
Message-ID: <yq1fwy3ke8u.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <4C731B08.1060100@interlog.com> (Douglas Gilbert's message of "Mon, 23 Aug 2010 21:06:16 -0400")

>>>>> "Doug" == Douglas Gilbert <dgilbert@interlog.com> writes:

Doug,

Doug> SCSI WRITE SAME does have one interesting quirk that Martin may
Doug> like to consider. If the "number of logical blocks" field is zero,
Doug> then that implies write to the end of the LU!! Madness when you
Doug> think about it.  libata's SCSI WRITE SAME translation takes the
Doug> zero number of LBs literally and does nothing I guess (when the
Doug> UNMAP bit is given).

Yeah.  Writing the whole device is one of my pet peeves.  Furthermore,
there are a bunch of devices that have an internal cap on the number of
blocks per WRITE SAME command that isn't advertised anywhere.  Said cap
is lower than the 32-bit block range permitted by WRITE SAME(16).  And
said cap sometimes also applies to the end-of-device case.  I.e. a block
count of 0 only works if you're close enough to the end.  Grrr!

Meanwhile elsewhere the proposal to advertise WRITE SAME limits in the
b0 VPD was gunned down in T10.  I ranted about this situation at length
in Boston.  Too bad you couldn't make it...

Anyway.  We're already bending SBC a bit for our internal use between sd
and libata-scsi.  So I don't consider the "mishandling" of the 0 block
length a problem.  sd would never issue a 0-length WS anyway.

-- 
Martin K. Petersen	Oracle Linux Engineering

      parent reply	other threads:[~2010-08-24 19:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23 19:24 [PATCH] scsi_debug: add TPRZ support Eric Sandeen
2010-08-24  1:06 ` Douglas Gilbert
2010-08-24  1:17   ` Eric Sandeen
2010-08-24 19:22   ` Martin K. Petersen [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=yq1fwy3ke8u.fsf@sermon.lab.mkp.net \
    --to=martin.petersen@oracle.com \
    --cc=dgilbert@interlog.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sandeen@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