Lines Matching refs:znode
858 const struct ubifs_znode *znode) in ubifs_dump_znode() argument
865 if (znode->parent) in ubifs_dump_znode()
866 zbr = &znode->parent->zbranch[znode->iip]; in ubifs_dump_znode()
871 znode, zbr->lnum, zbr->offs, zbr->len, znode->parent, znode->iip, in ubifs_dump_znode()
872 znode->level, znode->child_cnt, znode->flags); in ubifs_dump_znode()
874 if (znode->child_cnt <= 0 || znode->child_cnt > c->fanout) { in ubifs_dump_znode()
880 for (n = 0; n < znode->child_cnt; n++) { in ubifs_dump_znode()
881 zbr = &znode->zbranch[n]; in ubifs_dump_znode()
882 if (znode->level > 0) in ubifs_dump_znode()
884 n, zbr->znode, zbr->lnum, zbr->offs, zbr->len, in ubifs_dump_znode()
889 n, zbr->znode, zbr->lnum, zbr->offs, zbr->len, in ubifs_dump_znode()
932 struct ubifs_znode *znode; in ubifs_dump_tnc() local
937 znode = ubifs_tnc_levelorder_next(c->zroot.znode, NULL); in ubifs_dump_tnc()
938 level = znode->level; in ubifs_dump_tnc()
940 while (znode) { in ubifs_dump_tnc()
941 if (level != znode->level) { in ubifs_dump_tnc()
942 level = znode->level; in ubifs_dump_tnc()
945 ubifs_dump_znode(c, znode); in ubifs_dump_tnc()
946 znode = ubifs_tnc_levelorder_next(c->zroot.znode, znode); in ubifs_dump_tnc()
951 static int dump_znode(struct ubifs_info *c, struct ubifs_znode *znode, in dump_znode() argument
954 ubifs_dump_znode(c, znode); in dump_znode()
1275 struct ubifs_znode *znode = zbr->znode; in dbg_check_znode() local
1276 struct ubifs_znode *zp = znode->parent; in dbg_check_znode()
1279 if (znode->child_cnt <= 0 || znode->child_cnt > c->fanout) { in dbg_check_znode()
1283 if (znode->level < 0) { in dbg_check_znode()
1287 if (znode->iip < 0 || znode->iip >= c->fanout) { in dbg_check_znode()
1294 if (!ubifs_zn_dirty(znode)) { in dbg_check_znode()
1299 if (ubifs_zn_dirty(znode)) { in dbg_check_znode()
1314 if (ubifs_zn_dirty(znode)) { in dbg_check_znode()
1324 if (znode->level != zp->level - 1) { in dbg_check_znode()
1337 if (znode->iip >= zp->child_cnt) { in dbg_check_znode()
1342 if (znode->iip != n) { in dbg_check_znode()
1345 &zp->zbranch[znode->iip].key)) { in dbg_check_znode()
1349 n = znode->iip; in dbg_check_znode()
1357 cmp = keys_cmp(c, min, &znode->zbranch[0].key); in dbg_check_znode()
1372 &znode->zbranch[znode->child_cnt - 1].key); in dbg_check_znode()
1390 for (n = 1; n < znode->child_cnt; n++) { in dbg_check_znode()
1391 cmp = keys_cmp(c, &znode->zbranch[n - 1].key, in dbg_check_znode()
1392 &znode->zbranch[n].key); in dbg_check_znode()
1399 if (!is_hash_key(c, &znode->zbranch[n].key)) { in dbg_check_znode()
1404 if (znode->level != 0 || c->replaying) in dbg_check_znode()
1411 err = dbg_check_key_order(c, &znode->zbranch[n - 1], in dbg_check_znode()
1412 &znode->zbranch[n]); in dbg_check_znode()
1422 for (n = 0; n < znode->child_cnt; n++) { in dbg_check_znode()
1423 if (!znode->zbranch[n].znode && in dbg_check_znode()
1424 (znode->zbranch[n].lnum == 0 || in dbg_check_znode()
1425 znode->zbranch[n].len == 0)) { in dbg_check_znode()
1430 if (znode->zbranch[n].lnum != 0 && in dbg_check_znode()
1431 znode->zbranch[n].len == 0) { in dbg_check_znode()
1436 if (znode->zbranch[n].lnum == 0 && in dbg_check_znode()
1437 znode->zbranch[n].len != 0) { in dbg_check_znode()
1442 if (znode->zbranch[n].lnum == 0 && in dbg_check_znode()
1443 znode->zbranch[n].offs != 0) { in dbg_check_znode()
1448 if (znode->level != 0 && znode->zbranch[n].znode) in dbg_check_znode()
1449 if (znode->zbranch[n].znode->parent != znode) { in dbg_check_znode()
1460 ubifs_dump_znode(c, znode); in dbg_check_znode()
1508 struct ubifs_znode *znode; in dbg_check_tnc() local
1516 if (!c->zroot.znode) in dbg_check_tnc()
1519 znode = ubifs_tnc_postorder_first(c->zroot.znode); in dbg_check_tnc()
1524 if (!znode->parent) in dbg_check_tnc()
1527 zbr = &znode->parent->zbranch[znode->iip]; in dbg_check_tnc()
1534 if (ubifs_zn_dirty(znode)) in dbg_check_tnc()
1540 prev = znode; in dbg_check_tnc()
1541 znode = ubifs_tnc_postorder_next(znode); in dbg_check_tnc()
1542 if (!znode) in dbg_check_tnc()
1550 if (prev->level == 0 && znode->level == 0 && !c->replaying && in dbg_check_tnc()
1552 &znode->zbranch[0].key)) { in dbg_check_tnc()
1554 &znode->zbranch[0]); in dbg_check_tnc()
1561 ubifs_dump_znode(c, znode); in dbg_check_tnc()
1611 struct ubifs_znode *znode, *child; in dbg_walk_index() local
1615 if (!c->zroot.znode) { in dbg_walk_index()
1616 c->zroot.znode = ubifs_load_znode(c, &c->zroot, NULL, 0); in dbg_walk_index()
1617 if (IS_ERR(c->zroot.znode)) { in dbg_walk_index()
1618 err = PTR_ERR(c->zroot.znode); in dbg_walk_index()
1619 c->zroot.znode = NULL; in dbg_walk_index()
1629 znode = c->zroot.znode; in dbg_walk_index()
1630 while (znode->level > 0) { in dbg_walk_index()
1631 zbr = &znode->zbranch[0]; in dbg_walk_index()
1632 child = zbr->znode; in dbg_walk_index()
1634 child = ubifs_load_znode(c, zbr, znode, 0); in dbg_walk_index()
1639 zbr->znode = child; in dbg_walk_index()
1642 znode = child; in dbg_walk_index()
1652 err = znode_cb(c, znode, priv); in dbg_walk_index()
1656 ubifs_dump_znode(c, znode); in dbg_walk_index()
1660 if (leaf_cb && znode->level == 0) { in dbg_walk_index()
1661 for (idx = 0; idx < znode->child_cnt; idx++) { in dbg_walk_index()
1662 zbr = &znode->zbranch[idx]; in dbg_walk_index()
1672 if (!znode->parent) in dbg_walk_index()
1675 idx = znode->iip + 1; in dbg_walk_index()
1676 znode = znode->parent; in dbg_walk_index()
1677 if (idx < znode->child_cnt) { in dbg_walk_index()
1679 zbr = &znode->zbranch[idx]; in dbg_walk_index()
1680 child = zbr->znode; in dbg_walk_index()
1682 child = ubifs_load_znode(c, zbr, znode, idx); in dbg_walk_index()
1687 zbr->znode = child; in dbg_walk_index()
1689 znode = child; in dbg_walk_index()
1698 while (znode->level > 0) { in dbg_walk_index()
1699 zbr = &znode->zbranch[0]; in dbg_walk_index()
1700 child = zbr->znode; in dbg_walk_index()
1702 child = ubifs_load_znode(c, zbr, znode, 0); in dbg_walk_index()
1707 zbr->znode = child; in dbg_walk_index()
1709 znode = child; in dbg_walk_index()
1717 if (znode->parent) in dbg_walk_index()
1718 zbr = &znode->parent->zbranch[znode->iip]; in dbg_walk_index()
1722 ubifs_dump_znode(c, znode); in dbg_walk_index()
1738 static int add_size(struct ubifs_info *c, struct ubifs_znode *znode, void *priv) in add_size() argument
1743 add = ubifs_idx_node_sz(c, znode->child_cnt); in add_size()
1956 struct ubifs_znode *znode; in read_add_inode() local
1966 err = ubifs_lookup_level0(c, &key, &znode, &n); in read_add_inode()
1976 zbr = &znode->zbranch[n]; in read_add_inode()
2191 struct ubifs_znode *znode; in check_inodes() local
2266 err = ubifs_lookup_level0(c, &key, &znode, &n); in check_inodes()
2277 zbr = &znode->zbranch[n]; in check_inodes()