diff options
Diffstat (limited to 'fs/xfs/xfs_ialloc_btree.c')
-rw-r--r-- | fs/xfs/xfs_ialloc_btree.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c index 9f4e33c945c2..dcd4a956e73c 100644 --- a/fs/xfs/xfs_ialloc_btree.c +++ b/fs/xfs/xfs_ialloc_btree.c | |||
@@ -219,6 +219,28 @@ xfs_inobt_kill_root( | |||
219 | return 0; | 219 | return 0; |
220 | } | 220 | } |
221 | 221 | ||
222 | #ifdef DEBUG | ||
223 | STATIC int | ||
224 | xfs_inobt_keys_inorder( | ||
225 | struct xfs_btree_cur *cur, | ||
226 | union xfs_btree_key *k1, | ||
227 | union xfs_btree_key *k2) | ||
228 | { | ||
229 | return be32_to_cpu(k1->inobt.ir_startino) < | ||
230 | be32_to_cpu(k2->inobt.ir_startino); | ||
231 | } | ||
232 | |||
233 | STATIC int | ||
234 | xfs_inobt_recs_inorder( | ||
235 | struct xfs_btree_cur *cur, | ||
236 | union xfs_btree_rec *r1, | ||
237 | union xfs_btree_rec *r2) | ||
238 | { | ||
239 | return be32_to_cpu(r1->inobt.ir_startino) + XFS_INODES_PER_CHUNK <= | ||
240 | be32_to_cpu(r2->inobt.ir_startino); | ||
241 | } | ||
242 | #endif /* DEBUG */ | ||
243 | |||
222 | #ifdef XFS_BTREE_TRACE | 244 | #ifdef XFS_BTREE_TRACE |
223 | ktrace_t *xfs_inobt_trace_buf; | 245 | ktrace_t *xfs_inobt_trace_buf; |
224 | 246 | ||
@@ -302,6 +324,11 @@ static const struct xfs_btree_ops xfs_inobt_ops = { | |||
302 | .init_ptr_from_cur = xfs_inobt_init_ptr_from_cur, | 324 | .init_ptr_from_cur = xfs_inobt_init_ptr_from_cur, |
303 | .key_diff = xfs_inobt_key_diff, | 325 | .key_diff = xfs_inobt_key_diff, |
304 | 326 | ||
327 | #ifdef DEBUG | ||
328 | .keys_inorder = xfs_inobt_keys_inorder, | ||
329 | .recs_inorder = xfs_inobt_recs_inorder, | ||
330 | #endif | ||
331 | |||
305 | #ifdef XFS_BTREE_TRACE | 332 | #ifdef XFS_BTREE_TRACE |
306 | .trace_enter = xfs_inobt_trace_enter, | 333 | .trace_enter = xfs_inobt_trace_enter, |
307 | .trace_cursor = xfs_inobt_trace_cursor, | 334 | .trace_cursor = xfs_inobt_trace_cursor, |