From: Douglas Gilbert <dgilbert@interlog.com>
To: Ric Wheeler <rwheeler@redhat.com>
Cc: Mark Lord <liml@rtr.ca>, Ingo Molnar <mingo@elte.hu>,
Christoph Hellwig <hch@infradead.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
jens.axboe@oracle.com,
IDE/ATA development list <linux-ide@vger.kernel.org>,
Neil Brown <neilb@suse.de>
Subject: Re: [PATCH, RFC] xfs: batched discard support
Date: Thu, 20 Aug 2009 10:58:45 -0400 [thread overview]
Message-ID: <4A8D64A5.9060003@interlog.com> (raw)
In-Reply-To: <4A8D5442.1000302@redhat.com>
Ric Wheeler wrote:
> On 08/19/2009 09:39 PM, Mark Lord wrote:
>> [resending, after fixing the Cc: list; somebody trimmed it earlier]
>>
>> Jamie Lokier wrote:
>> ..
>>> I don't remember - does TRIM guarantee the blocks read zeros afterwards?
>> ..
>>
>> No, it doesn't.
>>
>> A drive can optionally support "deterministic TRIM", whereby it will
>> return
>> consistent data for any given trimmed sector afterwards, but that
>> doesn't mean zeros.
>>
>> -ml
>
> Note that returning consistent data is critical for devices that are
> used in a RAID group since you will need each RAID block that is used to
> compute the parity to continue to return the same data until you
> overwrite it with new data :-)
>
> If we have a device that does not support this (or is misconfigured not
> to do this), we should not use those devices in an MD group & do discard
> against it...
A closer reading of d2015r2-ATAATAPI_Command_Set_-_2_ACS-2.pdf
section 7.10.3.2 (latest ACS-2 draft from www.t13.org) shows
that there are 3 possible variants for data read from a logical
block that has been trimmed (or "unmapped"):
a) indeterminate
b) determinate
c) determinate, return all zeroes
In the case of b) the same data is returned for each
subsequent read. And that data must not be something
that has previously be written to some other LBA!
In the case of SCSI (sbc3r19.pdf) case b) is not
supported (very sensibly IMO).
Another difference I noticed between SCSI and ATA
drafts is with the SECURITY ERASE UNIT command which
is somewhat similar to the SCSI FORMAT UNIT command
(which includes a security erase option). The ATA
draft says that all blocks are determinate ("mapped"
in the SCSI state model) after a SECURITY ERASE UNIT.
The SCSI draft says that all logical blocks may be
unmapped after FORMAT UNIT.
Doug Gilbert
prev parent reply other threads:[~2009-08-20 14:58 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-16 0:47 [PATCH, RFC] xfs: batched discard support Christoph Hellwig
2009-08-16 1:35 ` Mark Lord
2009-08-16 2:19 ` Mark Lord
2009-08-16 2:25 ` Christoph Hellwig
2009-08-16 2:49 ` Mark Lord
2009-08-16 3:25 ` Mark Lord
2009-08-16 13:00 ` Mark Lord
2009-08-16 13:53 ` Christoph Hellwig
2009-08-16 13:59 ` Mark Lord
2009-08-16 14:06 ` Mark Lord
2009-08-16 14:23 ` Christoph Hellwig
2009-08-16 14:26 ` Mark Lord
2009-08-19 20:39 ` Ingo Molnar
2009-08-20 1:05 ` Christoph Hellwig
2009-08-20 1:10 ` Jamie Lokier
2009-08-20 1:38 ` Douglas Gilbert
2009-08-20 1:38 ` Mark Lord
2009-08-21 12:46 ` Ingo Molnar
2009-08-20 1:39 ` Mark Lord
2009-08-20 13:48 ` Ric Wheeler
2009-08-20 14:38 ` Mark Lord
2009-08-20 14:42 ` Ric Wheeler
2009-08-20 17:19 ` Greg Freemyer
2009-08-20 14:42 ` James Bottomley
2009-08-20 15:43 ` Rolf Eike Beer
2009-08-20 17:00 ` Ric Wheeler
2009-08-20 14:58 ` 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=4A8D64A5.9060003@interlog.com \
--to=dgilbert@interlog.com \
--cc=a.p.zijlstra@chello.nl \
--cc=hch@infradead.org \
--cc=jens.axboe@oracle.com \
--cc=liml@rtr.ca \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=neilb@suse.de \
--cc=paulus@samba.org \
--cc=rwheeler@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=xfs@oss.sgi.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).