From mboxrd@z Thu Jan 1 00:00:00 1970 From: OGAWA Hirofumi Subject: Re: [PATCH 0/7] Discard requests, v2 Date: Mon, 11 Aug 2008 02:55:17 +0900 Message-ID: <871w0wrbzu.fsf@devron.myhome.or.jp> References: <1218299181.26926.88.camel@pmac.infradead.org> <87abflrejb.fsf@devron.myhome.or.jp> <1218363946.5063.25.camel@pmac.infradead.org> <20080810163718.GA528@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Woodhouse , Jens Axboe , Andrew Morton , Ric Wheeler , linux-fsdevel@vger.kernel.org, gilad@codefidence.com, matthew@wil.cx To: Jamie Lokier Return-path: Received: from mail.parknet.ad.jp ([210.171.162.6]:57028 "EHLO mail.officemail.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752223AbYHJRzY (ORCPT ); Sun, 10 Aug 2008 13:55:24 -0400 In-Reply-To: <20080810163718.GA528@shareable.org> (Jamie Lokier's message of "Sun, 10 Aug 2008 17:37:18 +0100") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Jamie Lokier writes: > David Woodhouse wrote: >> > Currently it seems we schedule data direction as READ (no flags). >> > Although I'm not sure, we might want to schedule it as WRITE? (I guess >> > WRITE can be allowed delay more than READ...) >> >> I'm not sure it matters much -- this is mostly going to be used on >> devices which aren't affected by I/O scheduling at all and should >> probably be using the no-op scheduler. [...] > you wouldn't want them to affect latency-sensitive READ. Yes. My concern is like it. If it's READ and it's passed to device immediately like sync, I guess there is impact to userland throughput. [...] @@ -1489,6 +1489,8 @@ void submit_bio(int rw, struct bio *bio) { int count = bio_sectors(bio); + if (rw & (1 << BIO_RW_DISCARD)) + rw |= WRITE; bio->bi_rw |= rw; Or another options is caller should do? e.g. (WRITE | (1 << BIO_RW_DISCARD)) -- OGAWA Hirofumi