Lines Matching refs:zbr

131 	const struct ubifs_zbranch *zbr = &znode->zbranch[0];
137 cmp = keys_cmp(c, key, &zbr[mid].key);
153 ubifs_assert(c, keys_cmp(c, key, &zbr[0].key) < 0);
155 ubifs_assert(c, keys_cmp(c, key, &zbr[*n].key) > 0);
157 ubifs_assert(c, keys_cmp(c, key, &zbr[*n + 1].key) < 0);
308 struct ubifs_zbranch *zbr = &znode->zbranch[i];
310 key_read(c, &br->key, &zbr->key);
311 zbr->lnum = le32_to_cpu(br->lnum);
312 zbr->offs = le32_to_cpu(br->offs);
313 zbr->len = le32_to_cpu(br->len);
314 ubifs_copy_hash(c, ubifs_branch_hash(c, br), zbr->hash);
315 zbr->znode = NULL;
319 if (zbr->lnum < c->main_first ||
320 zbr->lnum >= c->leb_cnt || zbr->offs < 0 ||
321 zbr->offs + zbr->len > c->leb_size || zbr->offs & 7) {
327 switch (key_type(c, &zbr->key)) {
335 i, key_type(c, &zbr->key));
343 type = key_type(c, &zbr->key);
345 if (zbr->len != c->ranges[type].len) {
347 type, zbr->len);
352 } else if (zbr->len < c->ranges[type].min_len ||
353 zbr->len > c->ranges[type].max_len) {
355 type, zbr->len);
401 * @zbr: znode branch
405 * This function loads znode pointed to by @zbr into the TNC cache and
410 struct ubifs_zbranch *zbr,
416 ubifs_assert(c, !zbr->znode);
425 err = read_znode(c, zbr, znode);
439 zbr->znode = znode;
454 * @zbr: key and position of the node
457 * This function reads a node defined by @zbr from the flash media. Returns
461 int ubifs_tnc_read_node(struct ubifs_info *c, struct ubifs_zbranch *zbr,
464 union ubifs_key key1, *key = &zbr->key;
469 * 'zbr' has to point to on-flash node. The node may sit in a bud and
472 wbuf = ubifs_get_wbuf(c, zbr->lnum);
474 err = ubifs_read_node_wbuf(wbuf, node, type, zbr->len,
475 zbr->lnum, zbr->offs);
477 err = ubifs_read_node(c, node, type, zbr->len, zbr->lnum,
478 zbr->offs);
489 zbr->lnum, zbr->offs);
492 ubifs_dump_node(c, node, zbr->len);
496 err = ubifs_node_check_hash(c, node, zbr->hash);
498 ubifs_bad_hash(c, node, zbr->hash, zbr->lnum, zbr->offs);