• Home
  • Raw
  • Download

Lines Matching full:level

32 	int			level,  in xchk_da_process_error()  argument
54 ds->state->path.blk[level].blkno), in xchk_da_process_error()
68 int level) in xchk_da_set_corrupt() argument
76 ds->state->path.blk[level].blkno), in xchk_da_set_corrupt()
83 int level) in xchk_da_btree_node_entry() argument
85 struct xfs_da_state_blk *blk = &ds->state->path.blk[level]; in xchk_da_btree_node_entry()
98 int level, in xchk_da_btree_hash() argument
107 if (hash < ds->hashes[level]) in xchk_da_btree_hash()
108 xchk_da_set_corrupt(ds, level); in xchk_da_btree_hash()
109 ds->hashes[level] = hash; in xchk_da_btree_hash()
111 if (level == 0) in xchk_da_btree_hash()
115 entry = xchk_da_btree_node_entry(ds, level - 1); in xchk_da_btree_hash()
118 xchk_da_set_corrupt(ds, level); in xchk_da_btree_hash()
130 int level, in xchk_da_btree_ptr_ok() argument
134 xchk_da_set_corrupt(ds, level); in xchk_da_btree_ptr_ok()
218 int level, in xchk_da_btree_block_check_sibling() argument
232 * level pointer anywhere. in xchk_da_btree_block_check_sibling()
238 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block_check_sibling()
246 if (!xchk_da_process_error(ds, level, &error)) in xchk_da_btree_block_check_sibling()
249 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block_check_sibling()
252 if (altpath->blk[level].bp) in xchk_da_btree_block_check_sibling()
253 xchk_buffer_recheck(ds->sc, altpath->blk[level].bp); in xchk_da_btree_block_check_sibling()
255 /* Compare upper level pointer to sibling pointer. */ in xchk_da_btree_block_check_sibling()
256 if (altpath->blk[level].blkno != sibling) in xchk_da_btree_block_check_sibling()
257 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block_check_sibling()
278 int level, in xchk_da_btree_block_check_siblings() argument
288 /* Top level blocks should not have sibling pointers. */ in xchk_da_btree_block_check_siblings()
289 if (level == 0) { in xchk_da_btree_block_check_siblings()
291 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block_check_siblings()
299 error = xchk_da_btree_block_check_sibling(ds, level, 0, back); in xchk_da_btree_block_check_siblings()
302 error = xchk_da_btree_block_check_sibling(ds, level, 1, forw); in xchk_da_btree_block_check_siblings()
313 int level, in xchk_da_btree_block() argument
327 blk = &ds->state->path.blk[level]; in xchk_da_btree_block()
328 ds->state->path.active = level + 1; in xchk_da_btree_block()
338 if (!xchk_da_btree_ptr_ok(ds, level, blkno)) in xchk_da_btree_block()
345 if (!xchk_da_process_error(ds, level, &error)) in xchk_da_btree_block()
355 if (ds->dargs.whichfork == XFS_DATA_FORK && level == 0 && in xchk_da_btree_block()
361 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block()
367 pmaxrecs = &ds->maxrecs[level]; in xchk_da_btree_block()
371 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block()
377 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block()
381 error = xchk_da_btree_block_check_siblings(ds, level, &hdr3->hdr); in xchk_da_btree_block()
394 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block()
403 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block()
412 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block()
424 if (level == 0) { in xchk_da_btree_block()
425 if (nodehdr.level >= XFS_DA_NODE_MAXDEPTH) { in xchk_da_btree_block()
426 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block()
429 ds->tree_level = nodehdr.level; in xchk_da_btree_block()
431 if (ds->tree_level != nodehdr.level) { in xchk_da_btree_block()
432 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block()
440 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block()
448 if (level > 0) { in xchk_da_btree_block()
451 key = xchk_da_btree_node_entry(ds, level - 1); in xchk_da_btree_block()
453 xchk_da_set_corrupt(ds, level); in xchk_da_btree_block()
481 int level; in xchk_da_btree() local
506 level = 0; in xchk_da_btree()
510 error = xchk_da_btree_block(&ds, level, blkno); in xchk_da_btree()
518 if (blks[level].bp == NULL) in xchk_da_btree()
521 blks[level].index = 0; in xchk_da_btree()
522 while (level >= 0 && level < XFS_DA_NODE_MAXDEPTH) { in xchk_da_btree()
524 if (blks[level].magic != XFS_DA_NODE_MAGIC) { in xchk_da_btree()
526 if (blks[level].index >= ds.maxrecs[level]) { in xchk_da_btree()
527 if (level > 0) in xchk_da_btree()
528 blks[level - 1].index++; in xchk_da_btree()
530 level--; in xchk_da_btree()
535 error = scrub_fn(&ds, level); in xchk_da_btree()
542 blks[level].index++; in xchk_da_btree()
548 if (blks[level].index >= ds.maxrecs[level]) { in xchk_da_btree()
549 if (level > 0) in xchk_da_btree()
550 blks[level - 1].index++; in xchk_da_btree()
552 level--; in xchk_da_btree()
557 key = xchk_da_btree_node_entry(&ds, level); in xchk_da_btree()
558 error = xchk_da_btree_hash(&ds, level, &key->hashval); in xchk_da_btree()
562 /* Drill another level deeper. */ in xchk_da_btree()
564 level++; in xchk_da_btree()
565 if (level >= XFS_DA_NODE_MAXDEPTH) { in xchk_da_btree()
567 xchk_da_set_corrupt(&ds, level - 1); in xchk_da_btree()
571 error = xchk_da_btree_block(&ds, level, blkno); in xchk_da_btree()
574 if (blks[level].bp == NULL) in xchk_da_btree()
577 blks[level].index = 0; in xchk_da_btree()
582 for (level = 0; level < XFS_DA_NODE_MAXDEPTH; level++) { in xchk_da_btree()
583 if (blks[level].bp == NULL) in xchk_da_btree()
585 xfs_trans_brelse(sc->tp, blks[level].bp); in xchk_da_btree()
586 blks[level].bp = NULL; in xchk_da_btree()