From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH 0/7] Discard requests, v2 Date: Tue, 12 Aug 2008 05:42:28 -0600 Message-ID: <20080812114227.GX8618@parisc-linux.org> References: <1218299181.26926.88.camel@pmac.infradead.org> <20080812091446.GF20055@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Woodhouse , Andrew Morton , Ric Wheeler , linux-fsdevel@vger.kernel.org, gilad@codefidence.com To: Jens Axboe Return-path: Received: from palinux.external.hp.com ([192.25.206.14]:57755 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752035AbYHLLmp (ORCPT ); Tue, 12 Aug 2008 07:42:45 -0400 Content-Disposition: inline In-Reply-To: <20080812091446.GF20055@kernel.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Aug 12, 2008 at 11:14:47AM +0200, Jens Axboe wrote: > 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. Would it make sense for discards to lock the page as if it were a write? -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."