Lines Matching refs:offs

167 int ubifs_add_bud_to_log(struct ubifs_info *c, int jhead, int lnum, int offs)  in ubifs_add_bud_to_log()  argument
207 if (c->bud_bytes + c->leb_size - offs > c->max_bud_bytes) { in ubifs_add_bud_to_log()
228 bud->start = offs; in ubifs_add_bud_to_log()
233 ref->offs = cpu_to_le32(bud->start); in ubifs_add_bud_to_log()
313 c->cmt_bud_bytes += wbuf->offs - bud->start; in remove_buds()
316 wbuf->offs - bud->start, c->cmt_bud_bytes); in remove_buds()
317 bud->start = wbuf->offs; in remove_buds()
381 int offs = c->jheads[i].wbuf.offs; in ubifs_log_start_commit() local
383 if (lnum == -1 || offs == c->leb_size) in ubifs_log_start_commit()
387 lnum, offs, dbg_jhead(i)); in ubifs_log_start_commit()
391 ref->offs = cpu_to_le32(offs); in ubifs_log_start_commit()
593 static int add_node(struct ubifs_info *c, void *buf, int *lnum, int *offs, in add_node() argument
597 int len = le32_to_cpu(ch->len), remains = c->leb_size - *offs; in add_node()
600 int sz = ALIGN(*offs, c->min_io_size), err; in add_node()
602 ubifs_pad(c, buf + *offs, sz - *offs); in add_node()
607 *offs = 0; in add_node()
609 memcpy(buf + *offs, node, len); in add_node()
610 *offs += ALIGN(len, 8); in add_node()
629 int lnum, err, first = 1, write_lnum, offs = 0; in ubifs_consolidate_log() local
656 &offs, snod->node); in ubifs_consolidate_log()
665 err = add_node(c, buf, &write_lnum, &offs, in ubifs_consolidate_log()
678 if (offs) { in ubifs_consolidate_log()
679 int sz = ALIGN(offs, c->min_io_size); in ubifs_consolidate_log()
681 ubifs_pad(c, buf + offs, sz - offs); in ubifs_consolidate_log()
685 offs = ALIGN(offs, c->min_io_size); in ubifs_consolidate_log()
702 c->lhead_offs = offs; in ubifs_consolidate_log()