[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49FEF5C5.6010404@interlog.com>
Date: Mon, 04 May 2009 16:03:49 +0200
From: Douglas Gilbert <dgilbert@...erlog.com>
To: James Bottomley <James.Bottomley@...senPartnership.com>
CC: Jeff Garzik <jeff@...zik.org>, Matthew Wilcox <matthew@....cx>,
Jens Axboe <jens.axboe@...cle.com>,
Boaz Harrosh <bharrosh@...asas.com>,
Hugh Dickins <hugh@...itas.com>,
Matthew Wilcox <willy@...ux.intel.com>,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org,
Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
Mark Lord <lkml@....ca>
Subject: Re: New TRIM/UNMAP tree published (2009-05-02)
James Bottomley wrote:
> On Sun, 2009-05-03 at 15:20 -0400, Jeff Garzik wrote:
>> Is WRITE SAME associated with this current DISCARD work, or is that just
>> a similar example? I'm unfamiliar with its issues...
>
> It's an adjunct body of work. T10 apparently ratified both UNMAP and
> the WRITE SAME extensions. What WRITE SAME does is write the same data
> block to multiple contiguous locations as specified in the CDB. What
> the thin provisioning update did for it is allow you to specify a flag
> saying I want these sectors unmapped. The perceived benefit of WRITE
> SAME is that you specify (with the write same data ... presumably all
> zeros) what an unmapped sector will return if it's ever read from again,
> which was a big argument in the UNMAP case.
James,
Your presumption is correct. For the UNMAP bit to be honoured
in the SCSI WRITE SAME command, the user data part of the
data-out buffer needs to be all zeros, and, if present,
the protection data part of the data-out buffer needs
to be all 0xff_s (i.e. 8 bytes of 0xff). Otherwise the
UNMAP bit in WRITE SAME command is ignored and it does a
"normal" WRITE SAME.
My $0.02's worth was a suggestion to report an error if the
UNMAP bit was given to WRITE SAME and the data-out
buffer did not comply with the above pattern. Alternatively
the data-out buffer could just be ignored. The author
of the WRITE SAME "unmap" facility duly noted my observations
and rejected them :-) The wording in sbc3r18.pdf for WRITE SAME
is contorted so there will be changes. And t10 is still
having teleconferences about thin provisioning so there may be
non-trivial changes in the near future.
Doug Gilbert
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists