Lines Matching refs:wbuf

68 	struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf;
72 wbuf->lnum, wbuf->offs + wbuf->used, gc_lnum,
73 c->leb_size - wbuf->offs - wbuf->used);
75 err = ubifs_wbuf_sync_nolock(wbuf);
92 err = ubifs_wbuf_seek_nolock(wbuf, gc_lnum, 0);
297 * @wbuf: write-buffer to move node to
299 * This function moves node @snod to @wbuf, changes TNC correspondingly, and
304 struct ubifs_scan_node *snod, struct ubifs_wbuf *wbuf)
306 int err, new_lnum = wbuf->lnum, new_offs = wbuf->offs + wbuf->used;
309 err = ubifs_wbuf_write_nolock(wbuf, snod->node, snod->len);
335 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf;
337 if (wbuf->lnum == -1) {
358 avail = c->leb_size - wbuf->offs - wbuf->used -
372 err = move_node(c, sleb, snod, wbuf);
380 avail = c->leb_size - wbuf->offs - wbuf->used -
404 err = move_node(c, sleb, snod, wbuf);
426 err = ubifs_wbuf_write_nolock(wbuf, auth,
433 ubifs_add_dirt(c, wbuf->lnum, ubifs_auth_node_sz(c));
475 err = ubifs_wbuf_sync(&c->jheads[i].wbuf);
495 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf;
498 ubifs_assert(c, c->gc_lnum != -1 || wbuf->offs + wbuf->used == 0 ||
501 ubifs_assert(c, wbuf->lnum != lnum);
609 err = ubifs_wbuf_sync_nolock(wbuf);
674 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf;
682 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead);
690 ubifs_assert(c, !wbuf->used);
729 * the wbuf lock, or while we have been running GC. In that
745 space_before = c->leb_size - wbuf->offs - wbuf->used;
746 if (wbuf->lnum == -1)
764 * and then executing sync wbuf will
796 space_after = c->leb_size - wbuf->offs - wbuf->used;
843 err = ubifs_wbuf_sync_nolock(wbuf);
851 mutex_unlock(&wbuf->io_mutex);
857 ubifs_wbuf_sync_nolock(wbuf);
859 mutex_unlock(&wbuf->io_mutex);
954 struct ubifs_wbuf *wbuf;
957 wbuf = &c->jheads[GCHD].wbuf;
958 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead);
973 mutex_unlock(&wbuf->io_mutex);