Lines Matching defs:jhead
90 * @jhead: journal head number
98 static int reserve_space(struct ubifs_info *c, int jhead, int len)
101 struct ubifs_wbuf *wbuf = &c->jheads[jhead].wbuf;
109 squeeze = (jhead == BASEHD);
111 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead);
139 dbg_jnl("no free space in jhead %s, run GC", dbg_jhead(jhead));
154 dbg_jnl("GC couldn't make a free LEB for jhead %s",
155 dbg_jhead(jhead));
165 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead);
166 dbg_jnl("got LEB %d for jhead %s", lnum, dbg_jhead(jhead));
197 err = ubifs_add_bud_to_log(c, jhead, lnum, offs);
257 * @jhead: journal head
264 * This function writes data to the reserved space of journal head @jhead.
268 static int write_head(struct ubifs_info *c, int jhead, void *buf, int len,
272 struct ubifs_wbuf *wbuf = &c->jheads[jhead].wbuf;
274 ubifs_assert(c, jhead != GCHD);
276 *lnum = c->jheads[jhead].wbuf.lnum;
277 *offs = c->jheads[jhead].wbuf.offs + c->jheads[jhead].wbuf.used;
278 dbg_jnl("jhead %s, LEB %d:%d, len %d",
279 dbg_jhead(jhead), *lnum, *offs, len);
282 err = ubifs_hash_nodes(c, buf, len, c->jheads[jhead].log_hash);
388 * @jhead: journal head
391 * This function makes space reservation in journal head @jhead. The function
401 static int make_reservation(struct ubifs_info *c, int jhead, int len)
408 err = reserve_space(c, jhead, len);
478 ubifs_err(c, "cannot reserve %d bytes in jhead %d, error %d",
479 len, jhead, err);
516 * @jhead: journal head
518 * This function releases journal head @jhead which was locked by
522 static inline void release_head(struct ubifs_info *c, int jhead)
524 mutex_unlock(&c->jheads[jhead].wbuf.io_mutex);