Lines Matching refs:offs
58 int offs, int quiet) in ubifs_scan_a_node() argument
66 dbg_scan("hit empty space at LEB %d:%d", lnum, offs); in ubifs_scan_a_node()
77 dbg_ntype(ch->node_type), lnum, offs); in ubifs_scan_a_node()
79 if (ubifs_check_node(c, buf, len, lnum, offs, quiet, 1)) in ubifs_scan_a_node()
89 offs + node_len + pad_len > c->leb_size) { in ubifs_scan_a_node()
92 lnum, offs); in ubifs_scan_a_node()
102 offs, offs + node_len + pad_len); in ubifs_scan_a_node()
107 lnum, offs, ALIGN(offs + node_len + pad_len, 8)); in ubifs_scan_a_node()
126 int offs, void *sbuf) in ubifs_start_scan() argument
131 dbg_scan("scan LEB %d:%d", lnum, offs); in ubifs_start_scan()
141 err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0); in ubifs_start_scan()
144 c->leb_size - offs, lnum, offs, err); in ubifs_start_scan()
164 int lnum, int offs) in ubifs_end_scan() argument
166 dbg_scan("stop scanning LEB %d at offset %d", lnum, offs); in ubifs_end_scan()
167 ubifs_assert(c, offs % c->min_io_size == 0); in ubifs_end_scan()
169 sleb->endpt = ALIGN(offs, c->min_io_size); in ubifs_end_scan()
182 void *buf, int offs) in ubifs_add_snod() argument
194 snod->offs = offs; in ubifs_add_snod()
225 void ubifs_scanned_corruption(const struct ubifs_info *c, int lnum, int offs, in ubifs_scanned_corruption() argument
230 ubifs_err(c, "corruption at LEB %d:%d", lnum, offs); in ubifs_scanned_corruption()
231 len = c->leb_size - offs; in ubifs_scanned_corruption()
234 ubifs_err(c, "first %d bytes from LEB %d:%d", len, lnum, offs); in ubifs_scanned_corruption()
255 int offs, void *sbuf, int quiet) in ubifs_scan() argument
257 void *buf = sbuf + offs; in ubifs_scan()
258 int err, len = c->leb_size - offs; in ubifs_scan()
261 sleb = ubifs_start_scan(c, lnum, offs, sbuf); in ubifs_scan()
270 lnum, offs, len); in ubifs_scan()
274 ret = ubifs_scan_a_node(c, buf, len, lnum, offs, quiet); in ubifs_scan()
277 offs += ret; in ubifs_scan()
303 err = ubifs_add_snod(c, sleb, buf, offs); in ubifs_scan()
308 offs += node_len; in ubifs_scan()
313 if (offs % c->min_io_size) { in ubifs_scan()
316 offs); in ubifs_scan()
320 ubifs_end_scan(c, sleb, lnum, offs); in ubifs_scan()
322 for (; len > 4; offs += 4, buf = buf + 4, len -= 4) in ubifs_scan()
325 for (; len; offs++, buf++, len--) in ubifs_scan()
329 lnum, offs); in ubifs_scan()
337 ubifs_scanned_corruption(c, lnum, offs, buf); in ubifs_scan()