Lines Matching refs:wbuf
68 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in switch_gc_head() local
72 wbuf->lnum, wbuf->offs + wbuf->used, gc_lnum, in switch_gc_head()
73 c->leb_size - wbuf->offs - wbuf->used); in switch_gc_head()
75 err = ubifs_wbuf_sync_nolock(wbuf); in switch_gc_head()
92 err = ubifs_wbuf_seek_nolock(wbuf, gc_lnum, 0); in switch_gc_head()
303 struct ubifs_scan_node *snod, struct ubifs_wbuf *wbuf) in move_node() argument
305 int err, new_lnum = wbuf->lnum, new_offs = wbuf->offs + wbuf->used; in move_node()
308 err = ubifs_wbuf_write_nolock(wbuf, snod->node, snod->len); in move_node()
334 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in move_nodes() local
336 if (wbuf->lnum == -1) { in move_nodes()
357 avail = c->leb_size - wbuf->offs - wbuf->used - in move_nodes()
371 err = move_node(c, sleb, snod, wbuf); in move_nodes()
379 avail = c->leb_size - wbuf->offs - wbuf->used - in move_nodes()
403 err = move_node(c, sleb, snod, wbuf); in move_nodes()
425 err = ubifs_wbuf_write_nolock(wbuf, auth, in move_nodes()
432 ubifs_add_dirt(c, wbuf->lnum, ubifs_auth_node_sz(c)); in move_nodes()
474 err = ubifs_wbuf_sync(&c->jheads[i].wbuf); in gc_sync_wbufs()
494 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in ubifs_garbage_collect_leb() local
497 ubifs_assert(c, c->gc_lnum != -1 || wbuf->offs + wbuf->used == 0 || in ubifs_garbage_collect_leb()
500 ubifs_assert(c, wbuf->lnum != lnum); in ubifs_garbage_collect_leb()
608 err = ubifs_wbuf_sync_nolock(wbuf); in ubifs_garbage_collect_leb()
673 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in ubifs_garbage_collect() local
681 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); in ubifs_garbage_collect()
689 ubifs_assert(c, !wbuf->used); in ubifs_garbage_collect()
741 space_before = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect()
742 if (wbuf->lnum == -1) in ubifs_garbage_collect()
781 space_after = c->leb_size - wbuf->offs - wbuf->used; in ubifs_garbage_collect()
828 err = ubifs_wbuf_sync_nolock(wbuf); in ubifs_garbage_collect()
836 mutex_unlock(&wbuf->io_mutex); in ubifs_garbage_collect()
842 ubifs_wbuf_sync_nolock(wbuf); in ubifs_garbage_collect()
844 mutex_unlock(&wbuf->io_mutex); in ubifs_garbage_collect()
938 struct ubifs_wbuf *wbuf; in ubifs_gc_end_commit() local
941 wbuf = &c->jheads[GCHD].wbuf; in ubifs_gc_end_commit()
942 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); in ubifs_gc_end_commit()
957 mutex_unlock(&wbuf->io_mutex); in ubifs_gc_end_commit()