Lines Matching refs:buf_offs
431 int lnum, offs, len, next_len, buf_len, buf_offs, used, avail; in layout_in_empty_space() local
439 buf_offs = c->ihead_offs; in layout_in_empty_space()
448 if (buf_offs + next_len > c->leb_size) in layout_in_empty_space()
463 buf_offs = 0; in layout_in_empty_space()
468 offs = buf_offs + used; in layout_in_empty_space()
514 buf_offs + used + next_len <= c->leb_size && in layout_in_empty_space()
519 buf_offs + used + next_len <= c->leb_size) in layout_in_empty_space()
525 buf_offs += blen; in layout_in_empty_space()
527 if (buf_offs + next_len > c->leb_size) { in layout_in_empty_space()
529 c->leb_size - buf_offs, blen - used, in layout_in_empty_space()
541 err = ubifs_update_one_lp(c, lnum, c->leb_size - buf_offs, in layout_in_empty_space()
549 c->dbg->new_ihead_offs = buf_offs; in layout_in_empty_space()
829 int i, lnum, offs, len, next_len, buf_len, buf_offs, used; in write_index() local
841 buf_offs = c->ihead_offs; in write_index()
850 if (buf_offs + next_len > c->leb_size) { in write_index()
911 buf_offs = 0; in write_index()
915 offs = buf_offs + used; in write_index()
980 nxt_offs = buf_offs + used + next_len; in write_index()
993 err = ubifs_leb_write(c, lnum, c->cbuf, buf_offs, blen); in write_index()
996 buf_offs += blen; in write_index()
1016 buf_offs != c->dbg->new_ihead_offs) { in write_index()
1022 c->ihead_offs = buf_offs; in write_index()