linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* get_block
@ 2009-05-18 19:32 Alberich de megres
  2009-05-18 20:00 ` get_block Josef Bacik
  0 siblings, 1 reply; 2+ messages in thread
From: Alberich de megres @ 2009-05-18 19:32 UTC (permalink / raw)
  To: linux-fsdevel

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!!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: get_block
  2009-05-18 19:32 get_block Alberich de megres
@ 2009-05-18 20:00 ` Josef Bacik
  0 siblings, 0 replies; 2+ messages in thread
From: Josef Bacik @ 2009-05-18 20:00 UTC (permalink / raw)
  To: Alberich de megres; +Cc: linux-fsdevel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-18 20:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-18 19:32 get_block Alberich de megres
2009-05-18 20:00 ` get_block Josef Bacik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).