| /fs/ubifs/ |
| A D | io.c | 569 wbuf->lnum, wbuf->offs, wbuf->used, dbg_jhead(wbuf->jhead)); in ubifs_wbuf_sync_nolock() 612 wbuf->avail = wbuf->size; in ubifs_wbuf_sync_nolock() 653 wbuf->avail = wbuf->size; in ubifs_wbuf_seek_nolock() 747 dbg_jhead(wbuf->jhead), wbuf->lnum, wbuf->offs + wbuf->used); in ubifs_wbuf_write_nolock() 791 wbuf->offs += wbuf->size; in ubifs_wbuf_write_nolock() 796 wbuf->avail = wbuf->size; in ubifs_wbuf_write_nolock() 817 dbg_jhead(wbuf->jhead), wbuf->lnum, wbuf->offs); in ubifs_wbuf_write_nolock() 818 memcpy(wbuf->buf + wbuf->used, buf, wbuf->avail); in ubifs_wbuf_write_nolock() 824 wbuf->offs += wbuf->size; in ubifs_wbuf_write_nolock() 837 wbuf->size, wbuf->lnum, wbuf->offs); in ubifs_wbuf_write_nolock() [all …]
|
| A D | gc.c | 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() 306 int err, new_lnum = wbuf->lnum, new_offs = wbuf->offs + wbuf->used; in move_node() 335 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in move_nodes() local 358 avail = c->leb_size - wbuf->offs - wbuf->used - in move_nodes() 380 avail = c->leb_size - wbuf->offs - wbuf->used - in move_nodes() 495 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in ubifs_garbage_collect_leb() local 674 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in ubifs_garbage_collect() local 682 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); in ubifs_garbage_collect() [all …]
|
| A D | journal.c | 101 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() 165 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); in reserve_space() 167 avail = c->leb_size - wbuf->offs - wbuf->used; in reserve_space() 176 lnum, wbuf->lnum, wbuf->offs + wbuf->used); in reserve_space() 272 struct ubifs_wbuf *wbuf = &c->jheads[jhead].wbuf; in write_head() local 768 struct ubifs_wbuf *wbuf = &c->jheads[BASEHD].wbuf; in ubifs_jnl_update() local 1282 struct ubifs_wbuf *wbuf = &c->jheads[BASEHD].wbuf; in ubifs_jnl_xrename() local 1509 struct ubifs_wbuf *wbuf = &c->jheads[BASEHD].wbuf; in ubifs_jnl_rename() local [all …]
|
| A D | misc.h | 127 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()
|
| A D | log.c | 79 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()
|
| A D | recovery.c | 1160 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()
|
| A D | tnc_misc.c | 487 struct ubifs_wbuf *wbuf; in ubifs_tnc_read_node() local 493 wbuf = ubifs_get_wbuf(c, zbr->lnum); in ubifs_tnc_read_node() 494 if (wbuf) in ubifs_tnc_read_node() 495 err = ubifs_read_node_wbuf(wbuf, node, type, zbr->len, in ubifs_tnc_read_node()
|
| A D | super.c | 481 err = ubifs_wbuf_sync(&c->jheads[i].wbuf); in ubifs_sync_fs() 835 c->jheads[i].wbuf.jhead = i; in alloc_wbufs() 848 c->jheads[GCHD].wbuf.no_timer = 1; in alloc_wbufs() 854 kfree(c->jheads[i].wbuf.buf); in alloc_wbufs() 855 kfree(c->jheads[i].wbuf.inodes); in alloc_wbufs() 859 kfree(c->jheads[i].wbuf.buf); in alloc_wbufs() 860 kfree(c->jheads[i].wbuf.inodes); in alloc_wbufs() 879 kfree(c->jheads[i].wbuf.buf); in free_wbufs() 880 kfree(c->jheads[i].wbuf.inodes); in free_wbufs() 1845 err = ubifs_wbuf_sync(&c->jheads[i].wbuf); in ubifs_remount_ro() [all …]
|
| A D | tnc.c | 1687 const struct ubifs_info *c = wbuf->c; in read_wbuf() 1695 spin_lock(&wbuf->lock); in read_wbuf() 1696 overlap = (lnum == wbuf->lnum && offs + len > wbuf->offs); in read_wbuf() 1699 spin_unlock(&wbuf->lock); in read_wbuf() 1704 rlen = wbuf->offs - offs; in read_wbuf() 1709 memcpy(buf + rlen, wbuf->buf + offs + rlen - wbuf->offs, len - rlen); in read_wbuf() 1710 spin_unlock(&wbuf->lock); in read_wbuf() 1792 struct ubifs_wbuf *wbuf; in ubifs_tnc_bulk_read() local 1803 wbuf = ubifs_get_wbuf(c, lnum); in ubifs_tnc_bulk_read() 1804 if (wbuf) in ubifs_tnc_bulk_read() [all …]
|
| A D | ubifs.h | 727 struct ubifs_wbuf wbuf; member 1732 int ubifs_wbuf_write_nolock(struct ubifs_wbuf *wbuf, void *buf, int len); 1733 int ubifs_wbuf_seek_nolock(struct ubifs_wbuf *wbuf, int lnum, int offs); 1734 int ubifs_wbuf_init(struct ubifs_info *c, struct ubifs_wbuf *wbuf); 1737 int ubifs_read_node_wbuf(struct ubifs_wbuf *wbuf, void *buf, int type, int len, 1753 int ubifs_wbuf_sync_nolock(struct ubifs_wbuf *wbuf); 1755 void ubifs_wbuf_add_ino_nolock(struct ubifs_wbuf *wbuf, ino_t inum);
|
| A D | debug.c | 655 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() 2550 } else if (c->jheads && lnum == c->jheads[GCHD].wbuf.lnum) { in power_cut_emulated()
|
| A D | commit.c | 130 err = ubifs_wbuf_sync(&c->jheads[i].wbuf); in do_commit()
|
| A D | replay.c | 147 err = ubifs_wbuf_seek_nolock(&c->jheads[b->bud->jhead].wbuf, in set_bud_lprops()
|
| A D | lprops.c | 1266 err = ubifs_wbuf_sync(&c->jheads[i].wbuf); in dbg_check_lprops()
|
| /fs/jffs2/ |
| A D | wbuf.c | 453 memmove(c->wbuf, c->wbuf + (start - c->wbuf_ofs), end - start); in jffs2_wbuf_recover() 710 if (!c->wbuf) in jffs2_flush_wbuf_gc() 768 if (!c->wbuf) in jffs2_flush_wbuf_pad() 1208 if (!c->wbuf) in jffs2_nand_flash_setup() 1233 kfree(c->wbuf); in jffs2_nand_flash_cleanup() 1269 if (!c->wbuf) in jffs2_dataflash_setup() 1290 kfree(c->wbuf); in jffs2_dataflash_cleanup() 1306 if (!c->wbuf) in jffs2_nor_wbuf_flash_setup() 1323 kfree(c->wbuf); in jffs2_nor_wbuf_flash_cleanup() 1339 if (!c->wbuf) in jffs2_ubivol_setup() [all …]
|
| A D | README.Locking | 33 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
|
| A D | Makefile | 14 jffs2-$(CONFIG_JFFS2_FS_WRITEBUFFER) += wbuf.o
|
| A D | jffs2_fs_sb.h | 131 unsigned char *wbuf; /* Write-behind buffer for NAND flash */ member
|
| A D | os-linux.h | 103 #define jffs2_is_writebuffered(c) (c->wbuf != NULL)
|
| /fs/jbd2/ |
| A D | commit.c | 354 struct buffer_head **wbuf = journal->j_wbuf; in jbd2_journal_commit_transaction() local 627 wbuf[bufs++] = descriptor; in jbd2_journal_commit_transaction() 664 jh, &wbuf[bufs], blocknr); in jbd2_journal_commit_transaction() 665 jbd2_file_log_bh(&io_bufs, wbuf[bufs]); in jbd2_journal_commit_transaction() 679 jbd2_block_tag_csum_set(journal, tag, wbuf[bufs], in jbd2_journal_commit_transaction() 712 struct buffer_head *bh = wbuf[i]; in jbd2_journal_commit_transaction()
|
| /fs/smb/server/ |
| A D | vfs.c | 410 char *stream_buf = NULL, *wbuf; in ksmbd_vfs_stream_write() local 442 wbuf = kvzalloc(size, KSMBD_DEFAULT_GFP); in ksmbd_vfs_stream_write() 443 if (!wbuf) { in ksmbd_vfs_stream_write() 449 memcpy(wbuf, stream_buf, v_len); in ksmbd_vfs_stream_write() 451 stream_buf = wbuf; in ksmbd_vfs_stream_write()
|