Lines Matching refs:offs

71 static int insert_old_idx(struct ubifs_info *c, int lnum, int offs)  in insert_old_idx()  argument
80 old_idx->offs = offs; in insert_old_idx()
90 else if (offs < o->offs) in insert_old_idx()
92 else if (offs > o->offs) in insert_old_idx()
119 return insert_old_idx(c, zbr->lnum, zbr->offs); in insert_old_idx_znode()
123 c->zroot.offs); in insert_old_idx_znode()
144 err = insert_old_idx(c, zbr->lnum, zbr->offs); in ins_clr_old_idx_znode()
148 zbr->offs = 0; in ins_clr_old_idx_znode()
153 err = insert_old_idx(c, c->zroot.lnum, c->zroot.offs); in ins_clr_old_idx_znode()
157 c->zroot.offs = 0; in ins_clr_old_idx_znode()
270 err = insert_old_idx(c, zbr->lnum, zbr->offs); in dirty_cow_znode()
279 zbr->offs = 0; in dirty_cow_znode()
434 int len, int lnum, int offs) in try_read_node() argument
440 dbg_io("LEB %d:%d, %s, length %d", lnum, offs, dbg_ntype(type), len); in try_read_node()
442 err = ubifs_leb_read(c, lnum, buf, offs, len, 1); in try_read_node()
445 type, lnum, offs, err); in try_read_node()
486 dbg_tnck(key, "LEB %d:%d, key ", zbr->lnum, zbr->offs); in fallible_read_node()
489 zbr->offs); in fallible_read_node()
501 zbr->lnum, zbr->offs, zbr->len); in fallible_read_node()
977 o_znode->zbranch[o_n].lnum, o_znode->zbranch[o_n].offs, in fallible_resolve_collision()
992 static int matches_position(struct ubifs_zbranch *zbr, int lnum, int offs) in matches_position() argument
994 if (zbr->lnum == lnum && zbr->offs == offs) in matches_position()
1020 int lnum, int offs) in resolve_collision_directly() argument
1027 if (matches_position(&znode->zbranch[nn], lnum, offs)) in resolve_collision_directly()
1039 if (matches_position(&znode->zbranch[nn], lnum, offs)) { in resolve_collision_directly()
1059 if (matches_position(&znode->zbranch[nn], lnum, offs)) in resolve_collision_directly()
1429 void *node, int *lnum, int *offs) in ubifs_tnc_locate() argument
1448 *offs = zt->offs; in ubifs_tnc_locate()
1504 int n, err = 0, lnum = -1, uninitialized_var(offs); in ubifs_tnc_get_bu_keys()
1530 offs = ALIGN(znode->zbranch[n].offs + len, 8); in ubifs_tnc_get_bu_keys()
1552 offs = ALIGN(zbr->offs + zbr->len, 8); in ubifs_tnc_get_bu_keys()
1563 if (zbr->lnum != lnum || zbr->offs != offs) in ubifs_tnc_get_bu_keys()
1565 offs += ALIGN(zbr->len, 8); in ubifs_tnc_get_bu_keys()
1635 int offs) in read_wbuf() argument
1640 dbg_io("LEB %d:%d, length %d", lnum, offs, len); in read_wbuf()
1641 ubifs_assert(wbuf && lnum >= 0 && lnum < c->leb_cnt && offs >= 0); in read_wbuf()
1642 ubifs_assert(!(offs & 7) && offs < c->leb_size); in read_wbuf()
1643 ubifs_assert(offs + len <= c->leb_size); in read_wbuf()
1646 overlap = (lnum == wbuf->lnum && offs + len > wbuf->offs); in read_wbuf()
1650 return ubifs_leb_read(c, lnum, buf, offs, len, 0); in read_wbuf()
1654 rlen = wbuf->offs - offs; in read_wbuf()
1659 memcpy(buf + rlen, wbuf->buf + offs + rlen - wbuf->offs, len - rlen); in read_wbuf()
1664 return ubifs_leb_read(c, lnum, buf, offs, rlen, 0); in read_wbuf()
1690 err = ubifs_check_node(c, buf, zbr->lnum, zbr->offs, 0, 0); in validate_data_node()
1706 zbr->lnum, zbr->offs); in validate_data_node()
1717 ubifs_err(c, "bad node at LEB %d:%d", zbr->lnum, zbr->offs); in validate_data_node()
1735 int lnum = bu->zbranch[0].lnum, offs = bu->zbranch[0].offs, len, err, i; in ubifs_tnc_bulk_read() local
1739 len = bu->zbranch[bu->cnt - 1].offs; in ubifs_tnc_bulk_read()
1740 len += bu->zbranch[bu->cnt - 1].len - offs; in ubifs_tnc_bulk_read()
1749 err = read_wbuf(wbuf, bu->buf, len, lnum, offs); in ubifs_tnc_bulk_read()
1751 err = ubifs_leb_read(c, lnum, bu->buf, offs, len, 0); in ubifs_tnc_bulk_read()
1759 lnum, offs, err); in ubifs_tnc_bulk_read()
2095 zbr->offs = 0; in tnc_insert()
2118 zi->zbranch[0].offs = c->zroot.offs; in tnc_insert()
2124 c->zroot.offs = 0; in tnc_insert()
2149 int offs, int len) in ubifs_tnc_add() argument
2155 dbg_tnck(key, "%d:%d, len %d, key ", lnum, offs, len); in ubifs_tnc_add()
2162 zbr.offs = offs; in ubifs_tnc_add()
2172 zbr->offs = offs; in ubifs_tnc_add()
2198 int old_lnum, int old_offs, int lnum, int offs, int len) in ubifs_tnc_replace() argument
2205 old_offs, lnum, offs, len); in ubifs_tnc_replace()
2216 if (zbr->lnum == old_lnum && zbr->offs == old_offs) { in ubifs_tnc_replace()
2222 zbr->offs = offs; in ubifs_tnc_replace()
2251 zbr->offs = offs; in ubifs_tnc_replace()
2281 int lnum, int offs, int len, const struct qstr *nm) in ubifs_tnc_add_nm() argument
2288 lnum, offs, nm->len, nm->name); in ubifs_tnc_add_nm()
2322 zbr->offs = offs; in ubifs_tnc_add_nm()
2333 zbr.offs = offs; in ubifs_tnc_add_nm()
2454 c->zroot.offs); in tnc_delete()
2459 c->zroot.offs = zbr->offs; in tnc_delete()
2972 int lnum, int offs) in lookup_znode() argument
2994 if (c->zroot.lnum == lnum && c->zroot.offs == offs) in lookup_znode()
3025 if (znode->zbranch[n].lnum == lnum && znode->zbranch[n].offs == offs) in lookup_znode()
3051 znode->zbranch[n].offs == offs) in lookup_znode()
3073 znode->zbranch[n].offs == offs) in lookup_znode()
3100 int lnum, int offs) in is_idx_node_in_tnc() argument
3104 znode = lookup_znode(c, key, level, lnum, offs); in is_idx_node_in_tnc()
3127 int lnum, int offs) in is_leaf_node_in_tnc() argument
3140 if (lnum == zbr->lnum && offs == zbr->offs) in is_leaf_node_in_tnc()
3160 if (lnum == zbr->lnum && offs == zbr->offs) in is_leaf_node_in_tnc()
3176 if (lnum == zbr->lnum && offs == zbr->offs) in is_leaf_node_in_tnc()
3197 int lnum, int offs, int is_idx) in ubifs_tnc_has_node() argument
3203 err = is_idx_node_in_tnc(c, key, level, lnum, offs); in ubifs_tnc_has_node()
3215 err = is_leaf_node_in_tnc(c, key, lnum, offs); in ubifs_tnc_has_node()
3237 int lnum, int offs) in ubifs_dirty_idx_node() argument
3243 znode = lookup_znode(c, key, level, lnum, offs); in ubifs_dirty_idx_node()