Loading fs/xfs/xfs_da_btree.c +11 −11 Original line number Diff line number Diff line Loading @@ -598,7 +598,7 @@ xfs_da3_root_split( * Set up the new root node. */ error = xfs_da3_node_create(args, (args->whichfork == XFS_DATA_FORK) ? mp->m_dirleafblk : 0, (args->whichfork == XFS_DATA_FORK) ? args->geo->leafblk : 0, level + 1, &bp, args->whichfork); if (error) return error; Loading @@ -616,10 +616,10 @@ xfs_da3_root_split( #ifdef DEBUG if (oldroot->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAFN_MAGIC) || oldroot->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAFN_MAGIC)) { ASSERT(blk1->blkno >= mp->m_dirleafblk && blk1->blkno < mp->m_dirfreeblk); ASSERT(blk2->blkno >= mp->m_dirleafblk && blk2->blkno < mp->m_dirfreeblk); ASSERT(blk1->blkno >= args->geo->leafblk && blk1->blkno < args->geo->freeblk); ASSERT(blk2->blkno >= args->geo->leafblk && blk2->blkno < args->geo->freeblk); } #endif Loading Loading @@ -894,8 +894,8 @@ xfs_da3_node_add( ASSERT(oldblk->index >= 0 && oldblk->index <= nodehdr.count); ASSERT(newblk->blkno != 0); if (state->args->whichfork == XFS_DATA_FORK) ASSERT(newblk->blkno >= state->mp->m_dirleafblk && newblk->blkno < state->mp->m_dirfreeblk); ASSERT(newblk->blkno >= state->args->geo->leafblk && newblk->blkno < state->args->geo->freeblk); /* * We may need to make some room before we insert the new node. Loading Loading @@ -1472,7 +1472,7 @@ xfs_da3_node_lookup_int( * Descend thru the B-tree searching each level for the right * node to use, until the right hashval is found. */ blkno = (args->whichfork == XFS_DATA_FORK)? state->mp->m_dirleafblk : 0; blkno = (args->whichfork == XFS_DATA_FORK)? args->geo->leafblk : 0; for (blk = &state->path.blk[0], state->path.active = 1; state->path.active <= XFS_DA_NODE_MAXDEPTH; blk++, state->path.active++) { Loading Loading @@ -2096,7 +2096,7 @@ xfs_da_grow_inode( trace_xfs_da_grow_inode(args); if (args->whichfork == XFS_DATA_FORK) { bno = args->dp->i_mount->m_dirleafblk; bno = args->geo->leafblk; count = args->dp->i_mount->m_dirblkfsbs; } else { bno = 0; Loading Loading @@ -2158,7 +2158,7 @@ xfs_da3_swap_lastblock( w = args->whichfork; ASSERT(w == XFS_DATA_FORK); mp = dp->i_mount; lastoff = mp->m_dirfreeblk; lastoff = args->geo->freeblk; error = xfs_bmap_last_before(tp, dp, &lastoff, w); if (error) return error; Loading Loading @@ -2247,7 +2247,7 @@ xfs_da3_swap_lastblock( sizeof(sib_info->back))); sib_buf = NULL; } par_blkno = mp->m_dirleafblk; par_blkno = args->geo->leafblk; level = -1; /* * Walk down the tree looking for the parent of the moved block. Loading fs/xfs/xfs_dir2.c +2 −5 Original line number Diff line number Diff line Loading @@ -147,9 +147,6 @@ xfs_da_mount( /* XXX: these are to be removed as code is converted to use geo */ mp->m_dirblksize = mp->m_dir_geo->blksize; mp->m_dirblkfsbs = mp->m_dir_geo->fsbcount; mp->m_dirdatablk = mp->m_dir_geo->datablk; mp->m_dirleafblk = mp->m_dir_geo->leafblk; mp->m_dirfreeblk = mp->m_dir_geo->freeblk; mp->m_dir_node_ents = mp->m_dir_geo->node_ents; mp->m_dir_magicpct = mp->m_dir_geo->magicpct; mp->m_attr_node_ents = mp->m_attr_geo->node_ents; Loading Loading @@ -690,7 +687,7 @@ xfs_dir2_isleaf( mp = dp->i_mount; if ((rval = xfs_bmap_last_offset(dp, &last, XFS_DATA_FORK))) return rval; *vp = last == mp->m_dirleafblk + (1 << mp->m_sb.sb_dirblklog); *vp = last == mp->m_dir_geo->leafblk + (1 << mp->m_sb.sb_dirblklog); return 0; } Loading Loading @@ -763,7 +760,7 @@ xfs_dir2_shrink_inode( */ return error; } if (db == mp->m_dirdatablk) if (db == args->geo->datablk) ASSERT(bno == 0); else ASSERT(bno > 0); Loading fs/xfs/xfs_dir2_block.c +3 −3 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ xfs_dir3_block_read( struct xfs_mount *mp = dp->i_mount; int err; err = xfs_da_read_buf(tp, dp, mp->m_dirdatablk, -1, bpp, err = xfs_da_read_buf(tp, dp, mp->m_dir_geo->datablk, -1, bpp, XFS_DATA_FORK, &xfs_dir3_block_buf_ops); if (!err && tp) xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_DIR_BLOCK_BUF); Loading Loading @@ -969,7 +969,7 @@ xfs_dir2_leaf_to_block( * Read the data block if we don't already have it, give up if it fails. */ if (!dbp) { error = xfs_dir3_data_read(tp, dp, mp->m_dirdatablk, -1, &dbp); error = xfs_dir3_data_read(tp, dp, args->geo->datablk, -1, &dbp); if (error) return error; } Loading Loading @@ -1034,7 +1034,7 @@ xfs_dir2_leaf_to_block( /* * Pitch the old leaf block. */ error = xfs_da_shrink_inode(args, mp->m_dirleafblk, lbp); error = xfs_da_shrink_inode(args, args->geo->leafblk, lbp); if (error) return error; Loading fs/xfs/xfs_dir2_data.c +5 −4 Original line number Diff line number Diff line Loading @@ -63,8 +63,10 @@ __xfs_dir3_data_check( int stale; /* count of stale leaves */ struct xfs_name name; const struct xfs_dir_ops *ops; struct xfs_da_geometry *geo; mp = bp->b_target->bt_mount; geo = mp->m_dir_geo; /* * We can be passed a null dp here from a verifier, so we need to go the Loading Loading @@ -172,8 +174,7 @@ __xfs_dir3_data_check( lastfree = 0; if (hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)) { addr = xfs_dir2_db_off_to_dataptr(mp->m_dir_geo, mp->m_dirdatablk, addr = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, (xfs_dir2_data_aoff_t) ((char *)dep - (char *)hdr)); name.name = dep->name; Loading fs/xfs/xfs_dir2_leaf.c +6 −6 Original line number Diff line number Diff line Loading @@ -641,7 +641,7 @@ xfs_dir2_leaf_addname( tp = args->trans; mp = dp->i_mount; error = xfs_dir3_leaf_read(tp, dp, mp->m_dirleafblk, -1, &lbp); error = xfs_dir3_leaf_read(tp, dp, args->geo->leafblk, -1, &lbp); if (error) return error; Loading Loading @@ -1232,7 +1232,7 @@ xfs_dir2_leaf_lookup_int( tp = args->trans; mp = dp->i_mount; error = xfs_dir3_leaf_read(tp, dp, mp->m_dirleafblk, -1, &lbp); error = xfs_dir3_leaf_read(tp, dp, args->geo->leafblk, -1, &lbp); if (error) return error; Loading Loading @@ -1429,7 +1429,7 @@ xfs_dir2_leaf_removename( */ if (be16_to_cpu(bf[0].length) == mp->m_dirblksize - dp->d_ops->data_entry_offset) { ASSERT(db != mp->m_dirdatablk); ASSERT(db != args->geo->datablk); if ((error = xfs_dir2_shrink_inode(args, db, dbp))) { /* * Nope, can't get rid of it because it caused Loading Loading @@ -1470,7 +1470,7 @@ xfs_dir2_leaf_removename( /* * If the data block was not the first one, drop it. */ else if (db != mp->m_dirdatablk) else if (db != args->geo->datablk) dbp = NULL; xfs_dir3_leaf_check(dp, lbp); Loading Loading @@ -1722,7 +1722,7 @@ xfs_dir2_node_to_leaf( * that may have been left behind during no-space-reservation * operations. */ while (fo > mp->m_dirfreeblk) { while (fo > args->geo->freeblk) { if ((error = xfs_dir2_node_trim_free(args, fo, &rval))) { return error; } Loading Loading @@ -1752,7 +1752,7 @@ xfs_dir2_node_to_leaf( /* * Read the freespace block. */ error = xfs_dir2_free_read(tp, dp, mp->m_dirfreeblk, &fbp); error = xfs_dir2_free_read(tp, dp, args->geo->freeblk, &fbp); if (error) return error; free = fbp->b_addr; Loading Loading
fs/xfs/xfs_da_btree.c +11 −11 Original line number Diff line number Diff line Loading @@ -598,7 +598,7 @@ xfs_da3_root_split( * Set up the new root node. */ error = xfs_da3_node_create(args, (args->whichfork == XFS_DATA_FORK) ? mp->m_dirleafblk : 0, (args->whichfork == XFS_DATA_FORK) ? args->geo->leafblk : 0, level + 1, &bp, args->whichfork); if (error) return error; Loading @@ -616,10 +616,10 @@ xfs_da3_root_split( #ifdef DEBUG if (oldroot->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAFN_MAGIC) || oldroot->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAFN_MAGIC)) { ASSERT(blk1->blkno >= mp->m_dirleafblk && blk1->blkno < mp->m_dirfreeblk); ASSERT(blk2->blkno >= mp->m_dirleafblk && blk2->blkno < mp->m_dirfreeblk); ASSERT(blk1->blkno >= args->geo->leafblk && blk1->blkno < args->geo->freeblk); ASSERT(blk2->blkno >= args->geo->leafblk && blk2->blkno < args->geo->freeblk); } #endif Loading Loading @@ -894,8 +894,8 @@ xfs_da3_node_add( ASSERT(oldblk->index >= 0 && oldblk->index <= nodehdr.count); ASSERT(newblk->blkno != 0); if (state->args->whichfork == XFS_DATA_FORK) ASSERT(newblk->blkno >= state->mp->m_dirleafblk && newblk->blkno < state->mp->m_dirfreeblk); ASSERT(newblk->blkno >= state->args->geo->leafblk && newblk->blkno < state->args->geo->freeblk); /* * We may need to make some room before we insert the new node. Loading Loading @@ -1472,7 +1472,7 @@ xfs_da3_node_lookup_int( * Descend thru the B-tree searching each level for the right * node to use, until the right hashval is found. */ blkno = (args->whichfork == XFS_DATA_FORK)? state->mp->m_dirleafblk : 0; blkno = (args->whichfork == XFS_DATA_FORK)? args->geo->leafblk : 0; for (blk = &state->path.blk[0], state->path.active = 1; state->path.active <= XFS_DA_NODE_MAXDEPTH; blk++, state->path.active++) { Loading Loading @@ -2096,7 +2096,7 @@ xfs_da_grow_inode( trace_xfs_da_grow_inode(args); if (args->whichfork == XFS_DATA_FORK) { bno = args->dp->i_mount->m_dirleafblk; bno = args->geo->leafblk; count = args->dp->i_mount->m_dirblkfsbs; } else { bno = 0; Loading Loading @@ -2158,7 +2158,7 @@ xfs_da3_swap_lastblock( w = args->whichfork; ASSERT(w == XFS_DATA_FORK); mp = dp->i_mount; lastoff = mp->m_dirfreeblk; lastoff = args->geo->freeblk; error = xfs_bmap_last_before(tp, dp, &lastoff, w); if (error) return error; Loading Loading @@ -2247,7 +2247,7 @@ xfs_da3_swap_lastblock( sizeof(sib_info->back))); sib_buf = NULL; } par_blkno = mp->m_dirleafblk; par_blkno = args->geo->leafblk; level = -1; /* * Walk down the tree looking for the parent of the moved block. Loading
fs/xfs/xfs_dir2.c +2 −5 Original line number Diff line number Diff line Loading @@ -147,9 +147,6 @@ xfs_da_mount( /* XXX: these are to be removed as code is converted to use geo */ mp->m_dirblksize = mp->m_dir_geo->blksize; mp->m_dirblkfsbs = mp->m_dir_geo->fsbcount; mp->m_dirdatablk = mp->m_dir_geo->datablk; mp->m_dirleafblk = mp->m_dir_geo->leafblk; mp->m_dirfreeblk = mp->m_dir_geo->freeblk; mp->m_dir_node_ents = mp->m_dir_geo->node_ents; mp->m_dir_magicpct = mp->m_dir_geo->magicpct; mp->m_attr_node_ents = mp->m_attr_geo->node_ents; Loading Loading @@ -690,7 +687,7 @@ xfs_dir2_isleaf( mp = dp->i_mount; if ((rval = xfs_bmap_last_offset(dp, &last, XFS_DATA_FORK))) return rval; *vp = last == mp->m_dirleafblk + (1 << mp->m_sb.sb_dirblklog); *vp = last == mp->m_dir_geo->leafblk + (1 << mp->m_sb.sb_dirblklog); return 0; } Loading Loading @@ -763,7 +760,7 @@ xfs_dir2_shrink_inode( */ return error; } if (db == mp->m_dirdatablk) if (db == args->geo->datablk) ASSERT(bno == 0); else ASSERT(bno > 0); Loading
fs/xfs/xfs_dir2_block.c +3 −3 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ xfs_dir3_block_read( struct xfs_mount *mp = dp->i_mount; int err; err = xfs_da_read_buf(tp, dp, mp->m_dirdatablk, -1, bpp, err = xfs_da_read_buf(tp, dp, mp->m_dir_geo->datablk, -1, bpp, XFS_DATA_FORK, &xfs_dir3_block_buf_ops); if (!err && tp) xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_DIR_BLOCK_BUF); Loading Loading @@ -969,7 +969,7 @@ xfs_dir2_leaf_to_block( * Read the data block if we don't already have it, give up if it fails. */ if (!dbp) { error = xfs_dir3_data_read(tp, dp, mp->m_dirdatablk, -1, &dbp); error = xfs_dir3_data_read(tp, dp, args->geo->datablk, -1, &dbp); if (error) return error; } Loading Loading @@ -1034,7 +1034,7 @@ xfs_dir2_leaf_to_block( /* * Pitch the old leaf block. */ error = xfs_da_shrink_inode(args, mp->m_dirleafblk, lbp); error = xfs_da_shrink_inode(args, args->geo->leafblk, lbp); if (error) return error; Loading
fs/xfs/xfs_dir2_data.c +5 −4 Original line number Diff line number Diff line Loading @@ -63,8 +63,10 @@ __xfs_dir3_data_check( int stale; /* count of stale leaves */ struct xfs_name name; const struct xfs_dir_ops *ops; struct xfs_da_geometry *geo; mp = bp->b_target->bt_mount; geo = mp->m_dir_geo; /* * We can be passed a null dp here from a verifier, so we need to go the Loading Loading @@ -172,8 +174,7 @@ __xfs_dir3_data_check( lastfree = 0; if (hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)) { addr = xfs_dir2_db_off_to_dataptr(mp->m_dir_geo, mp->m_dirdatablk, addr = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, (xfs_dir2_data_aoff_t) ((char *)dep - (char *)hdr)); name.name = dep->name; Loading
fs/xfs/xfs_dir2_leaf.c +6 −6 Original line number Diff line number Diff line Loading @@ -641,7 +641,7 @@ xfs_dir2_leaf_addname( tp = args->trans; mp = dp->i_mount; error = xfs_dir3_leaf_read(tp, dp, mp->m_dirleafblk, -1, &lbp); error = xfs_dir3_leaf_read(tp, dp, args->geo->leafblk, -1, &lbp); if (error) return error; Loading Loading @@ -1232,7 +1232,7 @@ xfs_dir2_leaf_lookup_int( tp = args->trans; mp = dp->i_mount; error = xfs_dir3_leaf_read(tp, dp, mp->m_dirleafblk, -1, &lbp); error = xfs_dir3_leaf_read(tp, dp, args->geo->leafblk, -1, &lbp); if (error) return error; Loading Loading @@ -1429,7 +1429,7 @@ xfs_dir2_leaf_removename( */ if (be16_to_cpu(bf[0].length) == mp->m_dirblksize - dp->d_ops->data_entry_offset) { ASSERT(db != mp->m_dirdatablk); ASSERT(db != args->geo->datablk); if ((error = xfs_dir2_shrink_inode(args, db, dbp))) { /* * Nope, can't get rid of it because it caused Loading Loading @@ -1470,7 +1470,7 @@ xfs_dir2_leaf_removename( /* * If the data block was not the first one, drop it. */ else if (db != mp->m_dirdatablk) else if (db != args->geo->datablk) dbp = NULL; xfs_dir3_leaf_check(dp, lbp); Loading Loading @@ -1722,7 +1722,7 @@ xfs_dir2_node_to_leaf( * that may have been left behind during no-space-reservation * operations. */ while (fo > mp->m_dirfreeblk) { while (fo > args->geo->freeblk) { if ((error = xfs_dir2_node_trim_free(args, fo, &rval))) { return error; } Loading Loading @@ -1752,7 +1752,7 @@ xfs_dir2_node_to_leaf( /* * Read the freespace block. */ error = xfs_dir2_free_read(tp, dp, mp->m_dirfreeblk, &fbp); error = xfs_dir2_free_read(tp, dp, args->geo->freeblk, &fbp); if (error) return error; free = fbp->b_addr; Loading