Lines Matching refs:buf_offs
419 int lnum, offs, len, next_len, buf_len, buf_offs, used, avail; in layout_in_empty_space() local
427 buf_offs = c->ihead_offs; in layout_in_empty_space()
436 if (buf_offs + next_len > c->leb_size) in layout_in_empty_space()
451 buf_offs = 0; in layout_in_empty_space()
456 offs = buf_offs + used; in layout_in_empty_space()
502 buf_offs + used + next_len <= c->leb_size && in layout_in_empty_space()
507 buf_offs + used + next_len <= c->leb_size) in layout_in_empty_space()
513 buf_offs += blen; in layout_in_empty_space()
515 if (buf_offs + next_len > c->leb_size) { in layout_in_empty_space()
517 c->leb_size - buf_offs, blen - used, in layout_in_empty_space()
529 err = ubifs_update_one_lp(c, lnum, c->leb_size - buf_offs, in layout_in_empty_space()
537 c->dbg->new_ihead_offs = buf_offs; in layout_in_empty_space()
813 int i, lnum, offs, len, next_len, buf_len, buf_offs, used; in write_index() local
825 buf_offs = c->ihead_offs; in write_index()
834 if (buf_offs + next_len > c->leb_size) { in write_index()
875 buf_offs = 0; in write_index()
879 offs = buf_offs + used; in write_index()
944 nxt_offs = buf_offs + used + next_len; in write_index()
957 err = ubifs_leb_write(c, lnum, c->cbuf, buf_offs, blen); in write_index()
960 buf_offs += blen; in write_index()
980 buf_offs != c->dbg->new_ihead_offs) { in write_index()
986 c->ihead_offs = buf_offs; in write_index()