From: OGAWA Hirofumi Subject: Re: [PATCH 3/7] [BLOCK] Add 'discard' request handling Date: Sun, 10 Aug 2008 05:39:53 +0900 Message-ID: <87iqu9rkh2.fsf@devron.myhome.or.jp> References: <1218299181.26926.88.camel@pmac.infradead.org> <1218299451.26926.102.camel@pmac.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jens Axboe , Andrew Morton , Ric Wheeler , linux-fsdevel@vger.kernel.org, gilad@codefidence.com, matthew@wil.cx To: David Woodhouse Return-path: Received: from mail.parknet.ad.jp ([210.171.162.6]:39044 "EHLO mail.officemail.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752033AbYHIUkD (ORCPT ); Sat, 9 Aug 2008 16:40:03 -0400 In-Reply-To: <1218299451.26926.102.camel@pmac.infradead.org> (David Woodhouse's message of "Sat, 09 Aug 2008 17:30:51 +0100") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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... > + > + /* > * different data direction or already started, don't merge > */ > if (bio_data_dir(bio) != rq_data_dir(rq)) -- OGAWA Hirofumi