From: OGAWA Hirofumi Subject: Re: [PATCH 0/7] Discard requests, v2 Date: Mon, 11 Aug 2008 23:21:44 +0900 Message-ID: <87myjjljif.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> <871w0wrbzu.fsf@devron.myhome.or.jp> <1218398875.5063.53.camel@pmac.infradead.org> <87wsiopn0u.fsf@devron.myhome.or.jp> <1218447616.12956.3.camel@pmac.infradead.org> <87ej4vn904.fsf@devron.myhome.or.jp> <1218460654.2977.4.camel@pmac.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jamie Lokier , 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]:51132 "EHLO mail.officemail.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbYHKOV4 (ORCPT ); Mon, 11 Aug 2008 10:21:56 -0400 In-Reply-To: <1218460654.2977.4.camel@pmac.infradead.org> (David Woodhouse's message of "Mon, 11 Aug 2008 14:17:34 +0100") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: David Woodhouse writes: > On Mon, 2008-08-11 at 19:25 +0900, OGAWA Hirofumi wrote: >> David Woodhouse writes: >> >> >> [I don't know whether blkdev_issue_flush() >> >> really want to use (1 << BIO_RW_BARRIER) or not.] >> > >> > I think it seems reasonable, but let's do it in a separate patch. Do you >> > want me to put it in my tree, or will you send it to Jens directly? >> >> Thanks. Could you put it in your tree > > Will do. Can I have it with a signed-off-by? Ah, of course. Signed-off-by: OGAWA Hirofumi > @@ -552,9 +553,15 @@ int fat_free_clusters(struct inode *inode, int cluster) > goto error; > } > > - /* Issue discard for the sectors we no longer care about */ > - sb_issue_discard(sb, fat_clus_to_blknr(sbi, fatent.entry), > - sbi->sec_per_clus, NULL); > + /* Issue discard for the sectors we no longer care about, > + batching contiguous clusters into one request */ > + if (cluster != fatent.entry + 1) { > + int nr_clus = fatent.entry - first_cl + 1; > + > + sb_issue_discard(sb, fat_clus_to_blknr(sbi, first_cl), > + nr_clus * sbi->sec_per_clus, NULL); Looks good to me. But, could you use following comment style for FAT? /* * Issue discard for the sectors we no longer care about, * batching contiguous clusters into one request */ Then, Acked-by: OGAWA Hirofumi Thanks. -- OGAWA Hirofumi