From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyungmin Park Subject: Re: [PATCH] block: fix DISCARD_BARRIER requests Date: Fri, 18 Jun 2010 22:29:09 +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-gx0-f174.google.com ([209.85.161.174]:60864 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758602Ab0FRN3K convert rfc822-to-8bit (ORCPT ); Fri, 18 Jun 2010 09:29:10 -0400 Received: by gxk21 with SMTP id 21so504991gxk.19 for ; Fri, 18 Jun 2010 06:29:09 -0700 (PDT) In-Reply-To: <20100617192217.GT27466@think> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jun 18, 2010 at 4:22 AM, Chris Mason w= rote: > 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 ones >> we don't keep the queue drained atomically around them, so requests >> could sneak inbetween them. =A0Depending on how the realtime discard >> is implemented that could cause issues. =A0In my XFS prototype for i= t >> I only deleted the extents from the tracking betree after the discar= d >> 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 cros= s > 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. 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