xfs
[Top] [All Lists]

Re: [PATCH, RFC] xfs: batched discard support

To: Ric Wheeler <rwheeler@xxxxxxxxxx>
Subject: Re: [PATCH, RFC] xfs: batched discard support
From: Greg Freemyer <greg.freemyer@xxxxxxxxx>
Date: Thu, 20 Aug 2009 13:19:20 -0400
Cc: Mark Lord <liml@xxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, jens.axboe@xxxxxxxxxx, "IDE/ATA development list" <linux-ide@xxxxxxxxxxxxxxx>, Neil Brown <neilb@xxxxxxx>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=X/DdlgigTC28w1frsNQwh2Ofo2kAofwxNRwIyb80yeA=; b=x4JWT1HIiLgIXHSDdcGVNBObxzxQFSc06OFmjMlILY8LPXu8r4gHo9nAQBDKcIb+3K +FqWmcGbSrAtKcEMzTk3yvPY8eDAimpT6o4Ihq0fuyvhtSmQD/s6TuuEcSSUbiFJRBAe vx0C6bCmHXX9yrcYu0YMCmn0RFZoNCS14IEOk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=n6BbcESG+x8XpOu/POE7M+C2SvVo24/WEwFhAxI1saig5Jp6GDxIWOTIsv2+Pmduyp Y1oulDh0j8QlkHuKcLzizmeKOcsvEZVsD3m0HJUkmTPuauf5E+DUcXwFzAw7FWDc7/9+ Zc7h3oAa3Ov5hXMHXw7+Ogt1bHXoHFRHfhdmI=
In-reply-to: <4A8D60C1.6000809@xxxxxxxxxx>
References: <20090816004705.GA7347@xxxxxxxxxxxxx> <20090819203916.GA25296@xxxxxxx> <4A8CA956.2060406@xxxxxx> <4A8D5442.1000302@xxxxxxxxxx> <4A8D5FDB.7080505@xxxxxx> <4A8D60C1.6000809@xxxxxxxxxx>
On Thu, Aug 20, 2009 at 10:42 AM, Ric Wheeler<rwheeler@xxxxxxxxxx> wrote:
> On 08/20/2009 10:38 AM, Mark Lord wrote:
>>
>> Ric Wheeler wrote:
>>>
>>> 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...
>>
>> ..
>>
>> Well, that's a bit drastic. But the RAID software should at least
>> not issue TRIM commands in ignorance of such.
>
> If the storage can return different data in a sequence of READ requests of
> the same sector (with no writes), there is nothing RAID could do. It would
> see total garbage...
>
>> Would it still be okay to do the TRIMs when the entire parity stripe
>> (across all members) is being discarded? (As opposed to just partial
>> data there being dropped)
>
> This should be safe if the MD bitmaps would prevent us from trying to
> READ/regenerate parity for that stripe...
>
> ric

The harder thing for mdraid is putting a stripe back in service.  If
even a single sector is written to a "discarded" stripe, the entire
stripe has to be written with determinate data that has the right
parity.

ie. Only full stripes can be discarded and only full-stripes can be
put back in service.

Greg
-- 
Greg Freemyer
Head of EDD Tape Extraction and Processing team
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
Preservation and Forensic processing of Exchange Repositories White Paper -
<http://www.norcrossgroup.com/forms/whitepapers/tng_whitepaper_fpe.html>

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com

<Prev in Thread] Current Thread [Next in Thread>