From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyungmin Park Subject: Re: [PATCH] block: fix DISCARD_BARRIER requests Date: Sat, 19 Jun 2010 11:22:58 +0900 Message-ID: References: <20100617075432.GA22407@lst.de> <4C19D86A.5030709@kernel.dk> <20100617165453.GA15824@lst.de> <20100617192217.GT27466@think> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE To: Chris Mason , Christoph Hellwig , Jens Axboe , linux-fsdevel@vger.kernel.org Return-path: Received: from mail-yx0-f174.google.com ([209.85.213.174]:54932 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750784Ab0FSCW7 convert rfc822-to-8bit (ORCPT ); Fri, 18 Jun 2010 22:22:59 -0400 Received: by yxl31 with SMTP id 31so270367yxl.19 for ; Fri, 18 Jun 2010 19:22:58 -0700 (PDT) In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jun 18, 2010 at 10:29 PM, Kyungmin Park = wrote: > On Fri, Jun 18, 2010 at 4:22 AM, Chris Mason = wrote: >> On Thu, Jun 17, 2010 at 06:54:53PM +0200, Christoph Hellwig wrote: >>> On Thu, Jun 17, 2010 at 10:10:18AM +0200, Jens Axboe wrote: >>> > Thanks, applied. There was a recent problem report on btrfs using >>> > discard, could possibly explain it if Chris assumed it was a full >>> > barrier. >>> >>> We actually have a much bigger issue with the DISCARD_BARRIER type. >>> If the discard request needs to get split into multiple smaller one= s >>> we don't keep the queue drained atomically around them, so requests >>> could sneak inbetween them. =A0Depending on how the realtime discar= d >>> is implemented that could cause issues. =A0In my XFS prototype for = it >>> I only deleted the extents from the tracking betree after the disca= rd >>> request has returned, but other filesystems rely on full barrier >>> semantics of DISCARD_BARRIER this could cause real problems. >> >> btrfs needs to know that a write after the discard returns won't cro= ss >> the discard, but beyond that we're happy with anything. > > I tested btrfs on MMC with discard support and get failed. you can > find a scenario and details at btrfs mailing list. > I'll check it with this patch. > Please note that MMC don't have any queue at internal as SSD. > It's same it failed to use discard on MMC with btrfs. Thank you, Kyungmin Park > -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html