Lines Matching refs:offs

50 			 int len, int lnum, int offs);
77 static int insert_old_idx(struct ubifs_info *c, int lnum, int offs) in insert_old_idx() argument
86 old_idx->offs = offs; in insert_old_idx()
96 else if (offs < o->offs) in insert_old_idx()
98 else if (offs > o->offs) in insert_old_idx()
125 return insert_old_idx(c, zbr->lnum, zbr->offs); in insert_old_idx_znode()
129 c->zroot.offs); in insert_old_idx_znode()
150 err = insert_old_idx(c, zbr->lnum, zbr->offs); in ins_clr_old_idx_znode()
154 zbr->offs = 0; in ins_clr_old_idx_znode()
159 err = insert_old_idx(c, c->zroot.lnum, c->zroot.offs); in ins_clr_old_idx_znode()
163 c->zroot.offs = 0; in ins_clr_old_idx_znode()
276 err = insert_old_idx(c, zbr->lnum, zbr->offs); in dirty_cow_znode()
285 zbr->offs = 0; in dirty_cow_znode()
452 int len, int lnum, int offs) in try_read_node() argument
458 dbg_io("LEB %d:%d, %s, length %d", lnum, offs, dbg_ntype(type), len); in try_read_node()
460 err = ubifs_leb_read(c, lnum, buf, offs, len, 1); in try_read_node()
463 type, lnum, offs, err); in try_read_node()
504 dbg_tnck(key, "LEB %d:%d, key ", zbr->lnum, zbr->offs); in fallible_read_node()
507 zbr->offs); in fallible_read_node()
519 zbr->lnum, zbr->offs, zbr->len); in fallible_read_node()
995 o_znode->zbranch[o_n].lnum, o_znode->zbranch[o_n].offs, in fallible_resolve_collision()
1010 static int matches_position(struct ubifs_zbranch *zbr, int lnum, int offs) in matches_position() argument
1012 if (zbr->lnum == lnum && zbr->offs == offs) in matches_position()
1038 int lnum, int offs) in resolve_collision_directly() argument
1045 if (matches_position(&znode->zbranch[nn], lnum, offs)) in resolve_collision_directly()
1057 if (matches_position(&znode->zbranch[nn], lnum, offs)) { in resolve_collision_directly()
1077 if (matches_position(&znode->zbranch[nn], lnum, offs)) in resolve_collision_directly()
1447 void *node, int *lnum, int *offs) in ubifs_tnc_locate() argument
1466 *offs = zt->offs; in ubifs_tnc_locate()
1522 int n, err = 0, lnum = -1, uninitialized_var(offs); in ubifs_tnc_get_bu_keys()
1548 offs = ALIGN(znode->zbranch[n].offs + len, 8); in ubifs_tnc_get_bu_keys()
1570 offs = ALIGN(zbr->offs + zbr->len, 8); in ubifs_tnc_get_bu_keys()
1581 if (zbr->lnum != lnum || zbr->offs != offs) in ubifs_tnc_get_bu_keys()
1583 offs += ALIGN(zbr->len, 8); in ubifs_tnc_get_bu_keys()
1653 int offs) in read_wbuf() argument
1658 dbg_io("LEB %d:%d, length %d", lnum, offs, len); in read_wbuf()
1659 ubifs_assert(wbuf && lnum >= 0 && lnum < c->leb_cnt && offs >= 0); in read_wbuf()
1660 ubifs_assert(!(offs & 7) && offs < c->leb_size); in read_wbuf()
1661 ubifs_assert(offs + len <= c->leb_size); in read_wbuf()
1664 overlap = (lnum == wbuf->lnum && offs + len > wbuf->offs); in read_wbuf()
1668 return ubifs_leb_read(c, lnum, buf, offs, len, 0); in read_wbuf()
1672 rlen = wbuf->offs - offs; in read_wbuf()
1677 memcpy(buf + rlen, wbuf->buf + offs + rlen - wbuf->offs, len - rlen); in read_wbuf()
1682 return ubifs_leb_read(c, lnum, buf, offs, rlen, 0); in read_wbuf()
1708 err = ubifs_check_node(c, buf, zbr->lnum, zbr->offs, 0, 0); in validate_data_node()
1724 zbr->lnum, zbr->offs); in validate_data_node()
1735 ubifs_err(c, "bad node at LEB %d:%d", zbr->lnum, zbr->offs); in validate_data_node()
1753 int lnum = bu->zbranch[0].lnum, offs = bu->zbranch[0].offs, len, err, i; in ubifs_tnc_bulk_read() local
1757 len = bu->zbranch[bu->cnt - 1].offs; in ubifs_tnc_bulk_read()
1758 len += bu->zbranch[bu->cnt - 1].len - offs; in ubifs_tnc_bulk_read()
1767 err = read_wbuf(wbuf, bu->buf, len, lnum, offs); in ubifs_tnc_bulk_read()
1769 err = ubifs_leb_read(c, lnum, bu->buf, offs, len, 0); in ubifs_tnc_bulk_read()
1777 lnum, offs, err); in ubifs_tnc_bulk_read()
2113 zbr->offs = 0; in tnc_insert()
2136 zi->zbranch[0].offs = c->zroot.offs; in tnc_insert()
2142 c->zroot.offs = 0; in tnc_insert()
2167 int offs, int len) in ubifs_tnc_add() argument
2173 dbg_tnck(key, "%d:%d, len %d, key ", lnum, offs, len); in ubifs_tnc_add()
2180 zbr.offs = offs; in ubifs_tnc_add()
2190 zbr->offs = offs; in ubifs_tnc_add()
2216 int old_lnum, int old_offs, int lnum, int offs, int len) in ubifs_tnc_replace() argument
2223 old_offs, lnum, offs, len); in ubifs_tnc_replace()
2234 if (zbr->lnum == old_lnum && zbr->offs == old_offs) { in ubifs_tnc_replace()
2240 zbr->offs = offs; in ubifs_tnc_replace()
2269 zbr->offs = offs; in ubifs_tnc_replace()
2299 int lnum, int offs, int len, const struct qstr *nm) in ubifs_tnc_add_nm() argument
2306 lnum, offs, nm->len, nm->name); in ubifs_tnc_add_nm()
2340 zbr->offs = offs; in ubifs_tnc_add_nm()
2351 zbr.offs = offs; in ubifs_tnc_add_nm()
2472 c->zroot.offs); in tnc_delete()
2477 c->zroot.offs = zbr->offs; in tnc_delete()
2994 int lnum, int offs) in lookup_znode() argument
3016 if (c->zroot.lnum == lnum && c->zroot.offs == offs) in lookup_znode()
3047 if (znode->zbranch[n].lnum == lnum && znode->zbranch[n].offs == offs) in lookup_znode()
3073 znode->zbranch[n].offs == offs) in lookup_znode()
3095 znode->zbranch[n].offs == offs) in lookup_znode()
3122 int lnum, int offs) in is_idx_node_in_tnc() argument
3126 znode = lookup_znode(c, key, level, lnum, offs); in is_idx_node_in_tnc()
3149 int lnum, int offs) in is_leaf_node_in_tnc() argument
3162 if (lnum == zbr->lnum && offs == zbr->offs) in is_leaf_node_in_tnc()
3182 if (lnum == zbr->lnum && offs == zbr->offs) in is_leaf_node_in_tnc()
3198 if (lnum == zbr->lnum && offs == zbr->offs) in is_leaf_node_in_tnc()
3219 int lnum, int offs, int is_idx) in ubifs_tnc_has_node() argument
3225 err = is_idx_node_in_tnc(c, key, level, lnum, offs); in ubifs_tnc_has_node()
3237 err = is_leaf_node_in_tnc(c, key, lnum, offs); in ubifs_tnc_has_node()
3259 int lnum, int offs) in ubifs_dirty_idx_node() argument
3265 znode = lookup_znode(c, key, level, lnum, offs); in ubifs_dirty_idx_node()