diff options
author | Dave Chinner <dchinner@redhat.com> | 2014-06-06 01:20:02 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-06-06 01:20:02 -0400 |
commit | 7ab610f9e0f1701b7b319bdc946b9804fb79e780 (patch) | |
tree | 388cd5166ab84962462e94404920c1750892d1a6 /fs/xfs | |
parent | ed358c0058fc7d97807c92333a4e06117a4be5fe (diff) |
xfs: move node entry counts to xfs_da_geometry
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_attr.c | 8 | ||||
-rw-r--r-- | fs/xfs/xfs_da_btree.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_dir2.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_dir2_node.c | 10 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.h | 2 |
5 files changed, 11 insertions, 16 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index c5474982cfd2..8bb9ae606593 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c | |||
@@ -899,7 +899,7 @@ restart: | |||
899 | state->args = args; | 899 | state->args = args; |
900 | state->mp = mp; | 900 | state->mp = mp; |
901 | state->blocksize = state->mp->m_sb.sb_blocksize; | 901 | state->blocksize = state->mp->m_sb.sb_blocksize; |
902 | state->node_ents = state->mp->m_attr_node_ents; | 902 | state->node_ents = args->geo->node_ents; |
903 | 903 | ||
904 | /* | 904 | /* |
905 | * Search to see if name already exists, and get back a pointer | 905 | * Search to see if name already exists, and get back a pointer |
@@ -1078,7 +1078,7 @@ restart: | |||
1078 | state->args = args; | 1078 | state->args = args; |
1079 | state->mp = mp; | 1079 | state->mp = mp; |
1080 | state->blocksize = state->mp->m_sb.sb_blocksize; | 1080 | state->blocksize = state->mp->m_sb.sb_blocksize; |
1081 | state->node_ents = state->mp->m_attr_node_ents; | 1081 | state->node_ents = args->geo->node_ents; |
1082 | state->inleaf = 0; | 1082 | state->inleaf = 0; |
1083 | error = xfs_da3_node_lookup_int(state, &retval); | 1083 | error = xfs_da3_node_lookup_int(state, &retval); |
1084 | if (error) | 1084 | if (error) |
@@ -1170,7 +1170,7 @@ xfs_attr_node_removename(xfs_da_args_t *args) | |||
1170 | state->args = args; | 1170 | state->args = args; |
1171 | state->mp = dp->i_mount; | 1171 | state->mp = dp->i_mount; |
1172 | state->blocksize = state->mp->m_sb.sb_blocksize; | 1172 | state->blocksize = state->mp->m_sb.sb_blocksize; |
1173 | state->node_ents = state->mp->m_attr_node_ents; | 1173 | state->node_ents = args->geo->node_ents; |
1174 | 1174 | ||
1175 | /* | 1175 | /* |
1176 | * Search to see if name exists, and get back a pointer to it. | 1176 | * Search to see if name exists, and get back a pointer to it. |
@@ -1433,7 +1433,7 @@ xfs_attr_node_get(xfs_da_args_t *args) | |||
1433 | state->args = args; | 1433 | state->args = args; |
1434 | state->mp = args->dp->i_mount; | 1434 | state->mp = args->dp->i_mount; |
1435 | state->blocksize = state->mp->m_sb.sb_blocksize; | 1435 | state->blocksize = state->mp->m_sb.sb_blocksize; |
1436 | state->node_ents = state->mp->m_attr_node_ents; | 1436 | state->node_ents = args->geo->node_ents; |
1437 | 1437 | ||
1438 | /* | 1438 | /* |
1439 | * Search to see if name exists, and get back a pointer to it. | 1439 | * Search to see if name exists, and get back a pointer to it. |
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c index 653e23f17f79..e6c994c00672 100644 --- a/fs/xfs/xfs_da_btree.c +++ b/fs/xfs/xfs_da_btree.c | |||
@@ -167,8 +167,8 @@ xfs_da3_node_verify( | |||
167 | * we don't know if the node is for and attribute or directory tree, | 167 | * we don't know if the node is for and attribute or directory tree, |
168 | * so only fail if the count is outside both bounds | 168 | * so only fail if the count is outside both bounds |
169 | */ | 169 | */ |
170 | if (ichdr.count > mp->m_dir_node_ents && | 170 | if (ichdr.count > mp->m_dir_geo->node_ents && |
171 | ichdr.count > mp->m_attr_node_ents) | 171 | ichdr.count > mp->m_attr_geo->node_ents) |
172 | return false; | 172 | return false; |
173 | 173 | ||
174 | /* XXX: hash order check? */ | 174 | /* XXX: hash order check? */ |
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c index aafe5e12c8d9..97f1802a9018 100644 --- a/fs/xfs/xfs_dir2.c +++ b/fs/xfs/xfs_dir2.c | |||
@@ -144,9 +144,6 @@ xfs_da_mount( | |||
144 | else | 144 | else |
145 | mp->m_dirnameops = &xfs_default_nameops; | 145 | mp->m_dirnameops = &xfs_default_nameops; |
146 | 146 | ||
147 | /* XXX: these are to be removed as code is converted to use geo */ | ||
148 | mp->m_dir_node_ents = mp->m_dir_geo->node_ents; | ||
149 | mp->m_attr_node_ents = mp->m_attr_geo->node_ents; | ||
150 | return 0; | 147 | return 0; |
151 | } | 148 | } |
152 | 149 | ||
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c index de5b29965ff5..eff6b8d67dab 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c | |||
@@ -1596,8 +1596,8 @@ xfs_dir2_node_addname( | |||
1596 | state = xfs_da_state_alloc(); | 1596 | state = xfs_da_state_alloc(); |
1597 | state->args = args; | 1597 | state->args = args; |
1598 | state->mp = args->dp->i_mount; | 1598 | state->mp = args->dp->i_mount; |
1599 | state->blocksize = state->args->geo->blksize; | 1599 | state->blocksize = args->geo->blksize; |
1600 | state->node_ents = state->mp->m_dir_node_ents; | 1600 | state->node_ents = args->geo->node_ents; |
1601 | /* | 1601 | /* |
1602 | * Look up the name. We're not supposed to find it, but | 1602 | * Look up the name. We're not supposed to find it, but |
1603 | * this gives us the insertion point. | 1603 | * this gives us the insertion point. |
@@ -2043,7 +2043,7 @@ xfs_dir2_node_lookup( | |||
2043 | state->args = args; | 2043 | state->args = args; |
2044 | state->mp = args->dp->i_mount; | 2044 | state->mp = args->dp->i_mount; |
2045 | state->blocksize = args->geo->blksize; | 2045 | state->blocksize = args->geo->blksize; |
2046 | state->node_ents = state->mp->m_dir_node_ents; | 2046 | state->node_ents = args->geo->node_ents; |
2047 | /* | 2047 | /* |
2048 | * Fill in the path to the entry in the cursor. | 2048 | * Fill in the path to the entry in the cursor. |
2049 | */ | 2049 | */ |
@@ -2098,7 +2098,7 @@ xfs_dir2_node_removename( | |||
2098 | state->args = args; | 2098 | state->args = args; |
2099 | state->mp = args->dp->i_mount; | 2099 | state->mp = args->dp->i_mount; |
2100 | state->blocksize = args->geo->blksize; | 2100 | state->blocksize = args->geo->blksize; |
2101 | state->node_ents = state->mp->m_dir_node_ents; | 2101 | state->node_ents = args->geo->node_ents; |
2102 | 2102 | ||
2103 | /* Look up the entry we're deleting, set up the cursor. */ | 2103 | /* Look up the entry we're deleting, set up the cursor. */ |
2104 | error = xfs_da3_node_lookup_int(state, &rval); | 2104 | error = xfs_da3_node_lookup_int(state, &rval); |
@@ -2168,7 +2168,7 @@ xfs_dir2_node_replace( | |||
2168 | state->args = args; | 2168 | state->args = args; |
2169 | state->mp = args->dp->i_mount; | 2169 | state->mp = args->dp->i_mount; |
2170 | state->blocksize = args->geo->blksize; | 2170 | state->blocksize = args->geo->blksize; |
2171 | state->node_ents = state->mp->m_dir_node_ents; | 2171 | state->node_ents = args->geo->node_ents; |
2172 | inum = args->inumber; | 2172 | inum = args->inumber; |
2173 | /* | 2173 | /* |
2174 | * Lookup the entry to change in the btree. | 2174 | * Lookup the entry to change in the btree. |
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 78ae7e48aef6..7295a0b7c343 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -134,8 +134,6 @@ typedef struct xfs_mount { | |||
134 | int m_fixedfsid[2]; /* unchanged for life of FS */ | 134 | int m_fixedfsid[2]; /* unchanged for life of FS */ |
135 | uint m_dmevmask; /* DMI events for this FS */ | 135 | uint m_dmevmask; /* DMI events for this FS */ |
136 | __uint64_t m_flags; /* global mount flags */ | 136 | __uint64_t m_flags; /* global mount flags */ |
137 | uint m_dir_node_ents; /* #entries in a dir danode */ | ||
138 | uint m_attr_node_ents; /* #entries in attr danode */ | ||
139 | int m_ialloc_inos; /* inodes in inode allocation */ | 137 | int m_ialloc_inos; /* inodes in inode allocation */ |
140 | int m_ialloc_blks; /* blocks in inode allocation */ | 138 | int m_ialloc_blks; /* blocks in inode allocation */ |
141 | int m_inoalign_mask;/* mask sb_inoalignmt if used */ | 139 | int m_inoalign_mask;/* mask sb_inoalignmt if used */ |