From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suparna Bhattacharya Subject: Re: [PATCH, RFC] map multiple blocks at a time in mpage_readpage(s) Date: Wed, 5 Oct 2005 21:41:59 +0530 Message-ID: <20051005161158.GA4444@in.ibm.com> References: <20051004194246.GA18432@lst.de> <17219.27904.659471.559297@gargle.gargle.HOWL> <20051005071037.GA27081@lst.de> Reply-To: suparna@in.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Nikita Danilov , linux-fsdevel@vger.kernel.org Return-path: Received: from e4.ny.us.ibm.com ([32.97.182.144]:44739 "EHLO e4.ny.us.ibm.com") by vger.kernel.org with ESMTP id S1030199AbVJEQDA (ORCPT ); Wed, 5 Oct 2005 12:03:00 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e4.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j95G2ogh025618 for ; Wed, 5 Oct 2005 12:02:50 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id j95G2o08105128 for ; Wed, 5 Oct 2005 12:02:50 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11/8.13.3) with ESMTP id j95G2nwD019265 for ; Wed, 5 Oct 2005 12:02:49 -0400 To: Christoph Hellwig Content-Disposition: inline In-Reply-To: <20051005071037.GA27081@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Oct 05, 2005 at 09:10:37AM +0200, Christoph Hellwig wrote: > On Wed, Oct 05, 2005 at 10:04:48AM +0400, Nikita Danilov wrote: > > > page->index, GFP_KERNEL)) { > > > bio = do_mpage_readpage(bio, page, > > > nr_pages - page_idx, > > > - &last_block_in_bio, get_block); > > > + &last_block_in_bio, &map_bh, > > > + &first_logical_block, &map_valid, > > > + get_blocks, get_block); > > > > Oh, function taking 9 arguments, please... this is not windows. > > I'm happy about suggestion to reduce the count. One of the real > problems is that the buffer_head structure is extremly badly suited for > the get_blocks callback. Having information like in the xfs_iomap_t > structure (which is XFS bmap information container) would simplify lots > of these things. In the writepages case, I ultimately ended up defining an mpageio structure somewhat like the DIO code. > > > > By the way, I cannot see where get_block callback is used by mpage.c > > code, why is it needed? > > It's only used by block_read_full_page which is called in the 'confused' > case. Having a readpage_fn callback may be a little bit better than this, but yes this is when one really starts wanting to get rid of bufferheads ... > - > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Regards Suparna -- Suparna Bhattacharya (suparna@in.ibm.com) Linux Technology Center IBM Software Lab, India