From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: [PATCH 0/7] Discard requests, v2 Date: Tue, 12 Aug 2008 11:14:47 +0200 Message-ID: <20080812091446.GF20055@kernel.dk> References: <1218299181.26926.88.camel@pmac.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Ric Wheeler , linux-fsdevel@vger.kernel.org, gilad@codefidence.com, matthew@wil.cx To: David Woodhouse Return-path: Received: from brick.kernel.dk ([87.55.233.238]:8425 "EHLO kernel.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751693AbYHLJOu (ORCPT ); Tue, 12 Aug 2008 05:14:50 -0400 Content-Disposition: inline In-Reply-To: <1218299181.26926.88.camel@pmac.infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Aug 09 2008, David Woodhouse wrote: > This time on top of the for-2.6.28 branch of > git://git.kernel.dk/linux-2.6-block.git > > I've made it cope with merging and sorting discard requests, still as a > separate patch at the end of the sequence. I don't think we have a > problem with discards passing writes in the queue, any more than we > _already_ had a problem with writes passing writes. But we don't already have this problem, that is the point. For page cache writes, the page cache nicely solves this issue for us - a write that comes in later gets to wait on the page lock before proceeding. So at least it's ordered. For O_DIRECT, the issuer is on his own. I think this is a serious problem and that we must ensure that an overlapping write doesn't pass a previously issued discard request. So in that sense, discards must be considered soft barriers. -- Jens Axboe