Hi, ----- Original Message ----- | Pull the code for computing the range of metapointers to iterate out of | gfs2_metapath_ra (for readahead), sweep_bh_for_rgrps (for deallocating | metapointers within a block), and trunc_dealloc (for walking the | metadata tree). | | In sweep_bh_for_rgrps, move the code for looking up the resource group | descriptor of the current resource group out of the inner loop. The | metatype check moves to trunc_dealloc. | | Signed-off-by: Andreas Gruenbacher <[email protected]> | --- (snip) | @@ -1229,7 +1216,11 @@ static int sweep_bh_for_rgrps(struct gfs2_inode *ip, | struct gfs2_holder *rd_gh, | outside the rgrp we just processed, | do it all over again. */ | if (current->journal_info) { | - struct buffer_head *dibh = mp->mp_bh[0]; | + struct buffer_head *dibh; | + | + ret = gfs2_meta_inode_buffer(ip, &dibh); | + if (ret) | + goto out; (snip)... | + brelse(dibh);
I don't understand why you prefer to use gfs2_meta_inode_buffer here instead of just using the copy we already have in the metapath. It seems to me this method would be a lot less efficient. Can you explain? Regards, Bob Peterson Red Hat File Systems
