]> git.karo-electronics.de Git - linux-beck.git/commitdiff
xfs: convert dir/attr btree threshold to xfs_da_geometry
authorDave Chinner <dchinner@redhat.com>
Fri, 6 Jun 2014 05:18:10 +0000 (15:18 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 6 Jun 2014 05:18:10 +0000 (15:18 +1000)
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_attr_leaf.c
fs/xfs/xfs_dir2.c
fs/xfs/xfs_dir2_node.c
fs/xfs/xfs_mount.h

index 2c0fdc8a71f6de0a916e7c7fc72c3e800f59a7b1..5be77b3a9bc4468d29061924bf9c01033ad05858 100644 (file)
@@ -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 */
 }
 
 /*
index 2685552480f0c7f6d6465eb32cbe87f1730f4337..aafe5e12c8d926e11b69924602aba390d6271786 100644 (file)
@@ -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;
 }
 
index ef34c197b62f887889d4dd6a39bafb19fdbc06f9..de5b29965ff5b0aed2ee19dbe277b7d58a277b88 100644 (file)
@@ -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;
 }
 
index 4e3f6cebebc659c07418167c297f89ce89233e54..78ae7e48aef6357eba38d2066b63a5f92d3645dc 100644 (file)
@@ -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 */