Commit ed358c00 authored by Dave Chinner's avatar Dave Chinner Committed by Dave Chinner

xfs: convert dir/attr btree threshold to xfs_da_geometry

Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 8f66193c
......@@ -1949,7 +1949,7 @@ xfs_attr3_leaf_remove(
tmp = ichdr.usedbytes + xfs_attr3_leaf_hdr_size(leaf) +
ichdr.count * sizeof(xfs_attr_leaf_entry_t);
return tmp < mp->m_attr_magicpct; /* leaf is < 37% full */
return tmp < args->geo->magicpct; /* leaf is < 37% full */
}
/*
......
......@@ -146,9 +146,7 @@ xfs_da_mount(
/* XXX: these are to be removed as code is converted to use geo */
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;
mp->m_attr_magicpct = mp->m_attr_geo->magicpct;
return 0;
}
......
......@@ -1312,7 +1312,7 @@ xfs_dir2_leafn_remove(
*/
*rval = (dp->d_ops->leaf_hdr_size +
(uint)sizeof(ents[0]) * (leafhdr.count - leafhdr.stale)) <
mp->m_dir_magicpct;
args->geo->magicpct;
return 0;
}
......
......@@ -148,8 +148,6 @@ typedef struct xfs_mount {
int m_dalign; /* stripe unit */
int m_swidth; /* stripe width */
int m_sinoalign; /* stripe unit inode alignment */
int m_attr_magicpct;/* 37% of the blocksize */
int m_dir_magicpct; /* 37% of the dir blocksize */
__uint8_t m_sectbb_log; /* sectlog - BBSHIFT */
const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */
const struct xfs_dir_ops *m_dir_inode_ops; /* vector of dir inode ops */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment