From: David Woodhouse Subject: Re: [PATCH 3/7] [BLOCK] Add 'discard' request handling Date: Sat, 09 Aug 2008 22:37:02 +0100 Message-ID: <1218317822.5063.14.camel@pmac.infradead.org> References: <1218299181.26926.88.camel@pmac.infradead.org> <1218299451.26926.102.camel@pmac.infradead.org> <87iqu9rkh2.fsf@devron.myhome.or.jp> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Jens Axboe , Andrew Morton , Ric Wheeler , linux-fsdevel@vger.kernel.org, gilad@codefidence.com, matthew@wil.cx To: OGAWA Hirofumi Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:59400 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751659AbYHIVh0 (ORCPT ); Sat, 9 Aug 2008 17:37:26 -0400 In-Reply-To: <87iqu9rkh2.fsf@devron.myhome.or.jp> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, 2008-08-10 at 05:39 +0900, OGAWA Hirofumi wrote: > David Woodhouse writes: > > > + * Don't merge file system and non-file system requests > > + */ > > + if (bio_has_data(bio) != bio_has_data(rq->bio)) > > + return 0; > > Maybe, this is bio_discard(bio) != bio_discard(rq->bio)? Because it > seems to say bio_discard(bio) == blk_empty_barrier(rq) can merge, > rq_mergeable(rq) already checked barrier before this though... Yeah, either would actually do the job just fine, but I should probably change it to bio_discard(). Thanks. -- dwmw2