Home
last modified time | relevance | path

Searched refs:wbuf (Results 1 – 21 of 21) sorted by relevance

/fs/ubifs/
Dio.c477 struct ubifs_wbuf *wbuf = container_of(timer, struct ubifs_wbuf, timer); in wbuf_timer_callback_nolock() local
479 dbg_io("jhead %s", dbg_jhead(wbuf->jhead)); in wbuf_timer_callback_nolock()
480 wbuf->need_sync = 1; in wbuf_timer_callback_nolock()
481 wbuf->c->need_wbuf_sync = 1; in wbuf_timer_callback_nolock()
482 ubifs_wake_up_bgt(wbuf->c); in wbuf_timer_callback_nolock()
491 static void new_wbuf_timer_nolock(struct ubifs_info *c, struct ubifs_wbuf *wbuf) in new_wbuf_timer_nolock() argument
499 ubifs_assert(c, !hrtimer_active(&wbuf->timer)); in new_wbuf_timer_nolock()
502 if (wbuf->no_timer) in new_wbuf_timer_nolock()
505 dbg_jhead(wbuf->jhead), in new_wbuf_timer_nolock()
508 hrtimer_start_range_ns(&wbuf->timer, softlimit, delta, in new_wbuf_timer_nolock()
[all …]
Dgc.c68 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()
304 struct ubifs_scan_node *snod, struct ubifs_wbuf *wbuf) in move_node() argument
306 int err, new_lnum = wbuf->lnum, new_offs = wbuf->offs + wbuf->used; in move_node()
309 err = ubifs_wbuf_write_nolock(wbuf, snod->node, snod->len); in move_node()
335 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in move_nodes() local
337 if (wbuf->lnum == -1) { in move_nodes()
[all …]
Djournal.c101 struct ubifs_wbuf *wbuf = &c->jheads[jhead].wbuf; in reserve_space() local
111 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); in reserve_space()
118 avail = c->leb_size - wbuf->offs - wbuf->used; in reserve_space()
119 if (wbuf->lnum != -1 && avail >= len) in reserve_space()
140 mutex_unlock(&wbuf->io_mutex); in reserve_space()
165 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); in reserve_space()
167 avail = c->leb_size - wbuf->offs - wbuf->used; in reserve_space()
169 if (wbuf->lnum != -1 && avail >= len) { in reserve_space()
176 lnum, wbuf->lnum, wbuf->offs + wbuf->used); in reserve_space()
194 err = ubifs_wbuf_sync_nolock(wbuf); in reserve_space()
[all …]
Dmisc.h127 static inline int ubifs_wbuf_sync(struct ubifs_wbuf *wbuf) in ubifs_wbuf_sync() argument
131 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); in ubifs_wbuf_sync()
132 err = ubifs_wbuf_sync_nolock(wbuf); in ubifs_wbuf_sync()
133 mutex_unlock(&wbuf->io_mutex); in ubifs_wbuf_sync()
Dlog.c79 return &c->jheads[jhead].wbuf; in ubifs_get_wbuf()
308 struct ubifs_wbuf *wbuf; in remove_buds() local
312 wbuf = &c->jheads[bud->jhead].wbuf; in remove_buds()
314 if (wbuf->lnum == bud->lnum) { in remove_buds()
319 c->cmt_bud_bytes += wbuf->offs - bud->start; in remove_buds()
322 wbuf->offs - bud->start, c->cmt_bud_bytes); in remove_buds()
323 bud->start = wbuf->offs; in remove_buds()
394 int lnum = c->jheads[i].wbuf.lnum; in ubifs_log_start_commit()
395 int offs = c->jheads[i].wbuf.offs; in ubifs_log_start_commit()
Drecovery.c1160 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in ubifs_rcvry_gc_commit() local
1164 dbg_rcvry("GC head LEB %d, offs %d", wbuf->lnum, wbuf->offs); in ubifs_rcvry_gc_commit()
1167 if (wbuf->lnum == -1 || wbuf->offs == c->leb_size) in ubifs_rcvry_gc_commit()
1170 err = ubifs_find_dirty_leb(c, &lp, wbuf->offs, 2); in ubifs_rcvry_gc_commit()
1180 ubifs_assert(c, lp.free + lp.dirty >= wbuf->offs); in ubifs_rcvry_gc_commit()
1192 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); in ubifs_rcvry_gc_commit()
1195 int err2 = ubifs_wbuf_sync_nolock(wbuf); in ubifs_rcvry_gc_commit()
1200 mutex_unlock(&wbuf->io_mutex); in ubifs_rcvry_gc_commit()
Dtnc_misc.c465 struct ubifs_wbuf *wbuf; in ubifs_tnc_read_node() local
471 wbuf = ubifs_get_wbuf(c, zbr->lnum); in ubifs_tnc_read_node()
472 if (wbuf) in ubifs_tnc_read_node()
473 err = ubifs_read_node_wbuf(wbuf, node, type, zbr->len, in ubifs_tnc_read_node()
Dsuper.c485 err = ubifs_wbuf_sync(&c->jheads[i].wbuf); in ubifs_sync_fs()
834 err = ubifs_wbuf_init(c, &c->jheads[i].wbuf); in alloc_wbufs()
838 c->jheads[i].wbuf.sync_callback = &bud_wbuf_callback; in alloc_wbufs()
839 c->jheads[i].wbuf.jhead = i; in alloc_wbufs()
852 c->jheads[GCHD].wbuf.no_timer = 1; in alloc_wbufs()
858 kfree(c->jheads[i].wbuf.buf); in alloc_wbufs()
859 kfree(c->jheads[i].wbuf.inodes); in alloc_wbufs()
863 kfree(c->jheads[i].wbuf.buf); in alloc_wbufs()
864 kfree(c->jheads[i].wbuf.inodes); in alloc_wbufs()
883 kfree(c->jheads[i].wbuf.buf); in free_wbufs()
[all …]
Dtnc.c1683 static int read_wbuf(struct ubifs_wbuf *wbuf, void *buf, int len, int lnum, in read_wbuf() argument
1686 const struct ubifs_info *c = wbuf->c; in read_wbuf()
1690 ubifs_assert(c, wbuf && lnum >= 0 && lnum < c->leb_cnt && offs >= 0); in read_wbuf()
1694 spin_lock(&wbuf->lock); in read_wbuf()
1695 overlap = (lnum == wbuf->lnum && offs + len > wbuf->offs); in read_wbuf()
1698 spin_unlock(&wbuf->lock); in read_wbuf()
1703 rlen = wbuf->offs - offs; in read_wbuf()
1708 memcpy(buf + rlen, wbuf->buf + offs + rlen - wbuf->offs, len - rlen); in read_wbuf()
1709 spin_unlock(&wbuf->lock); in read_wbuf()
1791 struct ubifs_wbuf *wbuf; in ubifs_tnc_bulk_read() local
[all …]
Dubifs.h730 struct ubifs_wbuf wbuf; member
1718 int ubifs_wbuf_write_nolock(struct ubifs_wbuf *wbuf, void *buf, int len);
1719 int ubifs_wbuf_seek_nolock(struct ubifs_wbuf *wbuf, int lnum, int offs);
1720 int ubifs_wbuf_init(struct ubifs_info *c, struct ubifs_wbuf *wbuf);
1723 int ubifs_read_node_wbuf(struct ubifs_wbuf *wbuf, void *buf, int type, int len,
1739 int ubifs_wbuf_sync_nolock(struct ubifs_wbuf *wbuf);
1741 void ubifs_wbuf_add_ino_nolock(struct ubifs_wbuf *wbuf, ino_t inum);
Ddebug.c655 dbg_jhead(c->jheads[i].wbuf.jhead), in ubifs_dump_budg()
656 c->jheads[i].wbuf.lnum); in ubifs_dump_budg()
756 lp->lnum == c->jheads[i].wbuf.lnum) { in ubifs_dump_lprop()
2542 } else if (c->jheads && lnum == c->jheads[GCHD].wbuf.lnum) { in power_cut_emulated()
Dcommit.c119 err = ubifs_wbuf_sync(&c->jheads[i].wbuf); in do_commit()
Dreplay.c147 err = ubifs_wbuf_seek_nolock(&c->jheads[b->bud->jhead].wbuf, in set_bud_lprops()
Dlprops.c1265 err = ubifs_wbuf_sync(&c->jheads[i].wbuf); in dbg_check_lprops()
/fs/jffs2/
Dwbuf.c260 c->wbuf, c->wbuf_pagesize, 0); in jffs2_verify_write()
382 memcpy(buf + (c->wbuf_ofs - start), c->wbuf, end - c->wbuf_ofs); in jffs2_wbuf_recover()
414 unsigned char *rewrite_buf = buf?:c->wbuf; in jffs2_wbuf_recover()
446 memmove(c->wbuf, rewrite_buf + towrite, c->wbuf_len); in jffs2_wbuf_recover()
451 memcpy(c->wbuf, buf, end-start); in jffs2_wbuf_recover()
453 memmove(c->wbuf, c->wbuf + (start - c->wbuf_ofs), end - start); in jffs2_wbuf_recover()
518 (void *)(buf?:c->wbuf) + (ref_offset(raw) - start)); in jffs2_wbuf_recover()
614 memset(c->wbuf + c->wbuf_len, 0, c->wbuf_pagesize - c->wbuf_len); in __jffs2_flush_wbuf()
617 struct jffs2_unknown_node *padnode = (void *)(c->wbuf + c->wbuf_len); in __jffs2_flush_wbuf()
639 &retlen, c->wbuf); in __jffs2_flush_wbuf()
[all …]
DREADME.Locking33 the alloc_sem is also used to protect the wbuf-related members of the
35 if the wbuf is currently holding any data is permitted, though.
142 write-behind buffer ('wbuf') used for flash chips where we must write
143 in blocks. It protects both the contents of the wbuf and the metadata
DMakefile14 jffs2-$(CONFIG_JFFS2_FS_WRITEBUFFER) += wbuf.o
Djffs2_fs_sb.h131 unsigned char *wbuf; /* Write-behind buffer for NAND flash */ member
Dos-linux.h103 #define jffs2_is_writebuffered(c) (c->wbuf != NULL)
/fs/jbd2/
Dcommit.c388 struct buffer_head **wbuf = journal->j_wbuf; in jbd2_journal_commit_transaction() local
663 wbuf[bufs++] = descriptor; in jbd2_journal_commit_transaction()
700 jh, &wbuf[bufs], blocknr); in jbd2_journal_commit_transaction()
705 jbd2_file_log_bh(&io_bufs, wbuf[bufs]); in jbd2_journal_commit_transaction()
719 jbd2_block_tag_csum_set(journal, tag, wbuf[bufs], in jbd2_journal_commit_transaction()
752 struct buffer_head *bh = wbuf[i]; in jbd2_journal_commit_transaction()
/fs/ksmbd/
Dvfs.c416 char *stream_buf = NULL, *wbuf; in ksmbd_vfs_stream_write() local
443 wbuf = kvzalloc(size, GFP_KERNEL); in ksmbd_vfs_stream_write()
444 if (!wbuf) { in ksmbd_vfs_stream_write()
450 memcpy(wbuf, stream_buf, v_len); in ksmbd_vfs_stream_write()
452 stream_buf = wbuf; in ksmbd_vfs_stream_write()