Lines Matching refs:zbr
131 const struct ubifs_zbranch *zbr = &znode->zbranch[0]; in ubifs_search_zbranch() local
137 cmp = keys_cmp(c, key, &zbr[mid].key); in ubifs_search_zbranch()
153 ubifs_assert(c, keys_cmp(c, key, &zbr[0].key) < 0); in ubifs_search_zbranch()
155 ubifs_assert(c, keys_cmp(c, key, &zbr[*n].key) > 0); in ubifs_search_zbranch()
157 ubifs_assert(c, keys_cmp(c, key, &zbr[*n + 1].key) < 0); in ubifs_search_zbranch()
330 struct ubifs_zbranch *zbr = &znode->zbranch[i]; in read_znode() local
332 key_read(c, &br->key, &zbr->key); in read_znode()
333 zbr->lnum = le32_to_cpu(br->lnum); in read_znode()
334 zbr->offs = le32_to_cpu(br->offs); in read_znode()
335 zbr->len = le32_to_cpu(br->len); in read_znode()
336 ubifs_copy_hash(c, ubifs_branch_hash(c, br), zbr->hash); in read_znode()
337 zbr->znode = NULL; in read_znode()
341 if (zbr->lnum < c->main_first || in read_znode()
342 zbr->lnum >= c->leb_cnt || zbr->offs < 0 || in read_znode()
343 zbr->offs + zbr->len > c->leb_size || zbr->offs & 7) { in read_znode()
349 switch (key_type(c, &zbr->key)) { in read_znode()
357 i, key_type(c, &zbr->key)); in read_znode()
365 type = key_type(c, &zbr->key); in read_znode()
367 if (zbr->len != c->ranges[type].len) { in read_znode()
369 type, zbr->len); in read_znode()
374 } else if (zbr->len < c->ranges[type].min_len || in read_znode()
375 zbr->len > c->ranges[type].max_len) { in read_znode()
377 type, zbr->len); in read_znode()
432 struct ubifs_zbranch *zbr, in ubifs_load_znode() argument
438 ubifs_assert(c, !zbr->znode); in ubifs_load_znode()
447 err = read_znode(c, zbr, znode); in ubifs_load_znode()
461 zbr->znode = znode; in ubifs_load_znode()
482 int ubifs_tnc_read_node(struct ubifs_info *c, struct ubifs_zbranch *zbr, in ubifs_tnc_read_node() argument
485 union ubifs_key key1, *key = &zbr->key; in ubifs_tnc_read_node()
493 wbuf = ubifs_get_wbuf(c, zbr->lnum); in ubifs_tnc_read_node()
495 err = ubifs_read_node_wbuf(wbuf, node, type, zbr->len, in ubifs_tnc_read_node()
496 zbr->lnum, zbr->offs); in ubifs_tnc_read_node()
498 err = ubifs_read_node(c, node, type, zbr->len, zbr->lnum, in ubifs_tnc_read_node()
499 zbr->offs); in ubifs_tnc_read_node()
510 zbr->lnum, zbr->offs); in ubifs_tnc_read_node()
513 ubifs_dump_node(c, node, zbr->len); in ubifs_tnc_read_node()
517 err = ubifs_node_check_hash(c, node, zbr->hash); in ubifs_tnc_read_node()
519 ubifs_bad_hash(c, node, zbr->hash, zbr->lnum, zbr->offs); in ubifs_tnc_read_node()