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()
308 struct ubifs_zbranch *zbr = &znode->zbranch[i]; in read_znode() local
310 key_read(c, &br->key, &zbr->key); in read_znode()
311 zbr->lnum = le32_to_cpu(br->lnum); in read_znode()
312 zbr->offs = le32_to_cpu(br->offs); in read_znode()
313 zbr->len = le32_to_cpu(br->len); in read_znode()
314 ubifs_copy_hash(c, ubifs_branch_hash(c, br), zbr->hash); in read_znode()
315 zbr->znode = NULL; in read_znode()
319 if (zbr->lnum < c->main_first || in read_znode()
320 zbr->lnum >= c->leb_cnt || zbr->offs < 0 || in read_znode()
321 zbr->offs + zbr->len > c->leb_size || zbr->offs & 7) { in read_znode()
327 switch (key_type(c, &zbr->key)) { in read_znode()
335 i, key_type(c, &zbr->key)); in read_znode()
343 type = key_type(c, &zbr->key); in read_znode()
345 if (zbr->len != c->ranges[type].len) { in read_znode()
347 type, zbr->len); in read_znode()
352 } else if (zbr->len < c->ranges[type].min_len || in read_znode()
353 zbr->len > c->ranges[type].max_len) { in read_znode()
355 type, zbr->len); in read_znode()
410 struct ubifs_zbranch *zbr, in ubifs_load_znode() argument
416 ubifs_assert(c, !zbr->znode); in ubifs_load_znode()
425 err = read_znode(c, zbr, znode); in ubifs_load_znode()
439 zbr->znode = znode; in ubifs_load_znode()
460 int ubifs_tnc_read_node(struct ubifs_info *c, struct ubifs_zbranch *zbr, in ubifs_tnc_read_node() argument
463 union ubifs_key key1, *key = &zbr->key; in ubifs_tnc_read_node()
471 wbuf = ubifs_get_wbuf(c, zbr->lnum); in ubifs_tnc_read_node()
473 err = ubifs_read_node_wbuf(wbuf, node, type, zbr->len, in ubifs_tnc_read_node()
474 zbr->lnum, zbr->offs); in ubifs_tnc_read_node()
476 err = ubifs_read_node(c, node, type, zbr->len, zbr->lnum, in ubifs_tnc_read_node()
477 zbr->offs); in ubifs_tnc_read_node()
488 zbr->lnum, zbr->offs); in ubifs_tnc_read_node()
491 ubifs_dump_node(c, node, zbr->len); in ubifs_tnc_read_node()
495 err = ubifs_node_check_hash(c, node, zbr->hash); in ubifs_tnc_read_node()
497 ubifs_bad_hash(c, node, zbr->hash, zbr->lnum, zbr->offs); in ubifs_tnc_read_node()