Lines Matching refs:offs
76 static int insert_old_idx(struct ubifs_info *c, int lnum, int offs) in insert_old_idx() argument
85 old_idx->offs = offs; in insert_old_idx()
95 else if (offs < o->offs) in insert_old_idx()
97 else if (offs > o->offs) in insert_old_idx()
124 return insert_old_idx(c, zbr->lnum, zbr->offs); in insert_old_idx_znode()
128 c->zroot.offs); in insert_old_idx_znode()
149 err = insert_old_idx(c, zbr->lnum, zbr->offs); in ins_clr_old_idx_znode()
153 zbr->offs = 0; in ins_clr_old_idx_znode()
158 err = insert_old_idx(c, c->zroot.lnum, c->zroot.offs); in ins_clr_old_idx_znode()
162 c->zroot.offs = 0; in ins_clr_old_idx_znode()
275 err = insert_old_idx(c, zbr->lnum, zbr->offs); in dirty_cow_znode()
284 zbr->offs = 0; in dirty_cow_znode()
439 int len, int lnum, int offs) in try_read_node() argument
445 dbg_io("LEB %d:%d, %s, length %d", lnum, offs, dbg_ntype(type), len); in try_read_node()
447 err = ubifs_leb_read(c, lnum, buf, offs, len, 1); in try_read_node()
450 type, lnum, offs, err); in try_read_node()
491 dbg_tnck(key, "LEB %d:%d, key ", zbr->lnum, zbr->offs); in fallible_read_node()
494 zbr->offs); in fallible_read_node()
506 zbr->lnum, zbr->offs, zbr->len); in fallible_read_node()
982 o_znode->zbranch[o_n].lnum, o_znode->zbranch[o_n].offs, in fallible_resolve_collision()
997 static int matches_position(struct ubifs_zbranch *zbr, int lnum, int offs) in matches_position() argument
999 if (zbr->lnum == lnum && zbr->offs == offs) in matches_position()
1025 int lnum, int offs) in resolve_collision_directly() argument
1032 if (matches_position(&znode->zbranch[nn], lnum, offs)) in resolve_collision_directly()
1044 if (matches_position(&znode->zbranch[nn], lnum, offs)) { in resolve_collision_directly()
1064 if (matches_position(&znode->zbranch[nn], lnum, offs)) in resolve_collision_directly()
1434 void *node, int *lnum, int *offs) in ubifs_tnc_locate() argument
1453 *offs = zt->offs; in ubifs_tnc_locate()
1509 int n, err = 0, lnum = -1, uninitialized_var(offs); in ubifs_tnc_get_bu_keys()
1535 offs = ALIGN(znode->zbranch[n].offs + len, 8); in ubifs_tnc_get_bu_keys()
1557 offs = ALIGN(zbr->offs + zbr->len, 8); in ubifs_tnc_get_bu_keys()
1568 if (zbr->lnum != lnum || zbr->offs != offs) in ubifs_tnc_get_bu_keys()
1570 offs += ALIGN(zbr->len, 8); in ubifs_tnc_get_bu_keys()
1640 int offs) in read_wbuf() argument
1645 dbg_io("LEB %d:%d, length %d", lnum, offs, len); in read_wbuf()
1646 ubifs_assert(wbuf && lnum >= 0 && lnum < c->leb_cnt && offs >= 0); in read_wbuf()
1647 ubifs_assert(!(offs & 7) && offs < c->leb_size); in read_wbuf()
1648 ubifs_assert(offs + len <= c->leb_size); in read_wbuf()
1651 overlap = (lnum == wbuf->lnum && offs + len > wbuf->offs); in read_wbuf()
1655 return ubifs_leb_read(c, lnum, buf, offs, len, 0); in read_wbuf()
1659 rlen = wbuf->offs - offs; in read_wbuf()
1664 memcpy(buf + rlen, wbuf->buf + offs + rlen - wbuf->offs, len - rlen); in read_wbuf()
1669 return ubifs_leb_read(c, lnum, buf, offs, rlen, 0); in read_wbuf()
1695 err = ubifs_check_node(c, buf, zbr->lnum, zbr->offs, 0, 0); in validate_data_node()
1711 zbr->lnum, zbr->offs); in validate_data_node()
1722 ubifs_err(c, "bad node at LEB %d:%d", zbr->lnum, zbr->offs); in validate_data_node()
1740 int lnum = bu->zbranch[0].lnum, offs = bu->zbranch[0].offs, len, err, i; in ubifs_tnc_bulk_read() local
1744 len = bu->zbranch[bu->cnt - 1].offs; in ubifs_tnc_bulk_read()
1745 len += bu->zbranch[bu->cnt - 1].len - offs; in ubifs_tnc_bulk_read()
1754 err = read_wbuf(wbuf, bu->buf, len, lnum, offs); in ubifs_tnc_bulk_read()
1756 err = ubifs_leb_read(c, lnum, bu->buf, offs, len, 0); in ubifs_tnc_bulk_read()
1764 lnum, offs, err); in ubifs_tnc_bulk_read()
2100 zbr->offs = 0; in tnc_insert()
2123 zi->zbranch[0].offs = c->zroot.offs; in tnc_insert()
2129 c->zroot.offs = 0; in tnc_insert()
2154 int offs, int len) in ubifs_tnc_add() argument
2160 dbg_tnck(key, "%d:%d, len %d, key ", lnum, offs, len); in ubifs_tnc_add()
2167 zbr.offs = offs; in ubifs_tnc_add()
2177 zbr->offs = offs; in ubifs_tnc_add()
2203 int old_lnum, int old_offs, int lnum, int offs, int len) in ubifs_tnc_replace() argument
2210 old_offs, lnum, offs, len); in ubifs_tnc_replace()
2221 if (zbr->lnum == old_lnum && zbr->offs == old_offs) { in ubifs_tnc_replace()
2227 zbr->offs = offs; in ubifs_tnc_replace()
2256 zbr->offs = offs; in ubifs_tnc_replace()
2286 int lnum, int offs, int len, const struct qstr *nm) in ubifs_tnc_add_nm() argument
2293 lnum, offs, nm->len, nm->name); in ubifs_tnc_add_nm()
2327 zbr->offs = offs; in ubifs_tnc_add_nm()
2338 zbr.offs = offs; in ubifs_tnc_add_nm()
2459 c->zroot.offs); in tnc_delete()
2464 c->zroot.offs = zbr->offs; in tnc_delete()
2977 int lnum, int offs) in lookup_znode() argument
2999 if (c->zroot.lnum == lnum && c->zroot.offs == offs) in lookup_znode()
3030 if (znode->zbranch[n].lnum == lnum && znode->zbranch[n].offs == offs) in lookup_znode()
3056 znode->zbranch[n].offs == offs) in lookup_znode()
3078 znode->zbranch[n].offs == offs) in lookup_znode()
3105 int lnum, int offs) in is_idx_node_in_tnc() argument
3109 znode = lookup_znode(c, key, level, lnum, offs); in is_idx_node_in_tnc()
3132 int lnum, int offs) in is_leaf_node_in_tnc() argument
3145 if (lnum == zbr->lnum && offs == zbr->offs) in is_leaf_node_in_tnc()
3165 if (lnum == zbr->lnum && offs == zbr->offs) in is_leaf_node_in_tnc()
3181 if (lnum == zbr->lnum && offs == zbr->offs) in is_leaf_node_in_tnc()
3202 int lnum, int offs, int is_idx) in ubifs_tnc_has_node() argument
3208 err = is_idx_node_in_tnc(c, key, level, lnum, offs); in ubifs_tnc_has_node()
3220 err = is_leaf_node_in_tnc(c, key, lnum, offs); in ubifs_tnc_has_node()
3242 int lnum, int offs) in ubifs_dirty_idx_node() argument
3248 znode = lookup_znode(c, key, level, lnum, offs); in ubifs_dirty_idx_node()