get_block
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!!
Quoted 9 lines · Alberich de megres
Hi!
Again, i got another question this time is about
get_blockfunction used on "mpage_writepages" foraddress_space_operationswritepage.It is supposed to map the number of blocks passed in
sector_tiblock 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