Lines Matching defs:offs

61 		else if (old_idx->offs < o->offs)
63 else if (old_idx->offs > o->offs)
79 * @offs: offset of obsoleted index node
98 static int insert_old_idx(struct ubifs_info *c, int lnum, int offs)
106 old_idx->offs = offs;
126 return insert_old_idx(c, zbr->lnum, zbr->offs);
130 c->zroot.offs);
151 err = insert_old_idx(c, zbr->lnum, zbr->offs);
155 zbr->offs = 0;
160 err = insert_old_idx(c, c->zroot.lnum, c->zroot.offs);
164 c->zroot.offs = 0;
257 zbr->offs = 0;
303 old_idx->offs = zbr->offs;
483 int offs = zbr->offs;
488 dbg_io("LEB %d:%d, %s, length %d", lnum, offs, dbg_ntype(type), len);
490 err = ubifs_leb_read(c, lnum, buf, offs, len, 1);
493 type, lnum, offs, err);
517 ubifs_bad_hash(c, buf, zbr->hash, lnum, offs);
539 dbg_tnck(key, "LEB %d:%d, key ", zbr->lnum, zbr->offs);
553 zbr->lnum, zbr->offs, zbr->len);
1030 o_znode->zbranch[o_n].lnum, o_znode->zbranch[o_n].offs,
1041 * @offs: offset of dent to match
1043 * This function returns %1 if @lnum:@offs matches, and %0 otherwise.
1045 static int matches_position(struct ubifs_zbranch *zbr, int lnum, int offs)
1047 if (zbr->lnum == lnum && zbr->offs == offs)
1060 * @offs: offset of dent node to match
1064 * flash address of the right node is known (@lnum:@offs) which makes it much
1067 * resolved, %0 if @lnum:@offs is not found and @zn and @n are set to the
1073 int lnum, int offs)
1080 if (matches_position(&znode->zbranch[nn], lnum, offs))
1092 if (matches_position(&znode->zbranch[nn], lnum, offs)) {
1112 if (matches_position(&znode->zbranch[nn], lnum, offs))
1471 * @offs: offset is returned here
1476 * case of failure. The node location can be returned in @lnum and @offs.
1479 void *node, int *lnum, int *offs)
1498 *offs = zt->offs;
1554 int n, err = 0, lnum = -1, offs;
1580 offs = ALIGN(znode->zbranch[n].offs + len, 8);
1602 offs = ALIGN(zbr->offs + zbr->len, 8);
1613 if (zbr->lnum != lnum || zbr->offs != offs)
1615 offs += ALIGN(zbr->len, 8);
1680 * @offs: offset from which to read
1685 int offs)
1690 dbg_io("LEB %d:%d, length %d", lnum, offs, len);
1691 ubifs_assert(c, wbuf && lnum >= 0 && lnum < c->leb_cnt && offs >= 0);
1692 ubifs_assert(c, !(offs & 7) && offs < c->leb_size);
1693 ubifs_assert(c, offs + len <= c->leb_size);
1696 overlap = (lnum == wbuf->lnum && offs + len > wbuf->offs);
1700 return ubifs_leb_read(c, lnum, buf, offs, len, 0);
1704 rlen = wbuf->offs - offs;
1709 memcpy(buf + rlen, wbuf->buf + offs + rlen - wbuf->offs, len - rlen);
1714 return ubifs_leb_read(c, lnum, buf, offs, rlen, 0);
1740 err = ubifs_check_node(c, buf, zbr->len, zbr->lnum, zbr->offs, 0, 0);
1748 ubifs_bad_hash(c, buf, zbr->hash, zbr->lnum, zbr->offs);
1762 zbr->lnum, zbr->offs);
1773 ubifs_err(c, "bad node at LEB %d:%d", zbr->lnum, zbr->offs);
1791 int lnum = bu->zbranch[0].lnum, offs = bu->zbranch[0].offs, len, err, i;
1795 len = bu->zbranch[bu->cnt - 1].offs;
1796 len += bu->zbranch[bu->cnt - 1].len - offs;
1805 err = read_wbuf(wbuf, bu->buf, len, lnum, offs);
1807 err = ubifs_leb_read(c, lnum, bu->buf, offs, len, 0);
1815 lnum, offs, err);
2100 * if they are split we add their lnum/offs to the old_idx tree.
2257 zbr->offs = 0;
2280 zi->zbranch[0].offs = c->zroot.offs;
2286 c->zroot.offs = 0;
2303 * @offs: node offset
2312 int offs, int len, const u8 *hash)
2318 dbg_tnck(key, "%d:%d, len %d, key ", lnum, offs, len);
2325 zbr.offs = offs;
2336 zbr->offs = offs;
2355 * @offs: node offset
2363 int old_lnum, int old_offs, int lnum, int offs, int len)
2370 old_offs, lnum, offs, len);
2381 if (zbr->lnum == old_lnum && zbr->offs == old_offs) {
2387 zbr->offs = offs;
2416 zbr->offs = offs;
2438 * @offs: node offset
2447 int lnum, int offs, int len, const u8 *hash,
2454 dbg_tnck(key, "LEB %d:%d, key ", lnum, offs);
2488 zbr->offs = offs;
2500 zbr.offs = offs;
2622 c->zroot.offs);
2627 c->zroot.offs = zbr->offs;
3211 * @offs: index node offset
3214 * address @lnum:@offs. It looks up the indexing tree by pulling all indexing
3220 * dirty znode which still refers the same @lnum:@offs. This function is clever
3225 * (indexed by @lnum:@offs).
3232 int lnum, int offs)
3254 if (c->zroot.lnum == lnum && c->zroot.offs == offs)
3285 if (znode->zbranch[n].lnum == lnum && znode->zbranch[n].offs == offs)
3311 znode->zbranch[n].offs == offs)
3333 znode->zbranch[n].offs == offs)
3348 * @offs: offset of index node
3360 int lnum, int offs)
3364 znode = lookup_znode(c, key, level, lnum, offs);
3378 * @offs: node offset
3387 int lnum, int offs)
3400 if (lnum == zbr->lnum && offs == zbr->offs)
3420 if (lnum == zbr->lnum && offs == zbr->offs)
3436 if (lnum == zbr->lnum && offs == zbr->offs)
3448 * @offs: node offset
3457 int lnum, int offs, int is_idx)
3463 err = is_idx_node_in_tnc(c, key, level, lnum, offs);
3475 err = is_leaf_node_in_tnc(c, key, lnum, offs);
3488 * @offs: index node offset
3497 int lnum, int offs)
3503 znode = lookup_znode(c, key, level, lnum, offs);