From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ted Ts'o Subject: Re: discard and barriers Date: Sun, 15 Aug 2010 17:25:34 -0400 Message-ID: <20100815212534.GE20124@thunk.org> References: <20100814115625.GA15902@lst.de> <20100814141451.GB14960@thunk.org> <20100814145210.GA23126@lst.de> <20100815173906.GA20124@thunk.org> <20100815190230.GA11416@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: hughd@google.com, hirofumi@mail.parknet.co.jp, chris.mason@oracle.com, swhiteho@redhat.com, linux-fsdevel@vger.kernel.org, jaxboe@fusionio.com, martin.petersen@oracle.com To: Christoph Hellwig Return-path: Received: from THUNK.ORG ([69.25.196.29]:37046 "EHLO thunker.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750842Ab0HOVZt (ORCPT ); Sun, 15 Aug 2010 17:25:49 -0400 Content-Disposition: inline In-Reply-To: <20100815190230.GA11416@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, Aug 15, 2010 at 09:02:30PM +0200, Christoph Hellwig wrote: > On Sun, Aug 15, 2010 at 01:39:06PM -0400, Ted Ts'o wrote: > > So after these ordering flush/ordering change that have been proposed, > > if the block device layer is free to reorder the discard and a > > subsequent write to a discard block, I will need to add a *new* wait > > for the discard to complete before I can free the busy extent list. > > And this will be true for all file systems that are currently issuing > > discards. Again, am I missing something? > > The above is correct, except for the *new* part. sb_issue_discard at > the moment is synchronous, so you're already waiting for it to finish. OK, now I understand why I'm confused. I thought the proposal was to change sb_issue_discard() to make it be asynchronous? Really, what we're talking about here is eliminating the explicit barrier/SYNCHRONIZE CACHE from the discard, correct? The sb_issue_discard() call will still remain synchronous. - Ted