From: Josef Bacik Subject: Re: get_block Date: Mon, 18 May 2009 16:00:22 -0400 Message-ID: <20090518200022.GA6158@dhcp231-156.rdu.redhat.com> References: <12d708830905181232k47f2363dmfaf3f8ccc2998bd2@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Alberich de megres Return-path: Received: from mx2.redhat.com ([66.187.237.31]:38437 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750955AbZERUBC (ORCPT ); Mon, 18 May 2009 16:01:02 -0400 Content-Disposition: inline In-Reply-To: <12d708830905181232k47f2363dmfaf3f8ccc2998bd2@mail.gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, May 18, 2009 at 09:32:48PM +0200, Alberich de megres wrote: > Hi! > > Again, i got another question this time is about get_block function > used on "mpage_writepages" for address_space_operations writepage. > > It is supposed to map the number of blocks passed in sector_t iblock > parameter? or it is asking for the block number iblock? > > thanks!! iblock is the relative block # in the inode that you want to map. Whatever you set as bh_result->b_size is how much will be mapped, so its usually something like bh_result->b_size = num_of_blocks_we_want << inode->i_blkbits; Hope that helps, Josef