fio 44 drivers/md/dm-verity-fec.c static int fec_decode_rs8(struct dm_verity *v, struct dm_verity_fec_io *fio, fio 53 drivers/md/dm-verity-fec.c return decode_rs8(fio->rs, data, par, v->fec->rsn, NULL, neras, fio 54 drivers/md/dm-verity-fec.c fio->erasures, 0, NULL); fio 105 drivers/md/dm-verity-fec.c struct dm_verity_fec_io *fio, fio 108 drivers/md/dm-verity-fec.c return &fio->bufs[i][j * v->fec->rsn]; fio 124 drivers/md/dm-verity-fec.c static int fec_decode_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio, fio 141 drivers/md/dm-verity-fec.c fec_for_each_buffer_rs_block(fio, n, i) { fio 142 drivers/md/dm-verity-fec.c block = fec_buffer_rs_block(v, fio, n, i); fio 143 drivers/md/dm-verity-fec.c res = fec_decode_rs8(v, fio, block, &par[offset], neras); fio 150 drivers/md/dm-verity-fec.c fio->output[block_offset] = block[byte_index]; fio 208 drivers/md/dm-verity-fec.c struct dm_verity_fec_io *fio = fec_io(io); fio 260 drivers/md/dm-verity-fec.c fio->erasures[(*neras)++] = i; fio 279 drivers/md/dm-verity-fec.c fio->erasures[(*neras)++] = i; fio 286 drivers/md/dm-verity-fec.c fec_for_each_buffer_rs_block(fio, n, j) { fio 292 drivers/md/dm-verity-fec.c rs_block = fec_buffer_rs_block(v, fio, n, j); fio 306 drivers/md/dm-verity-fec.c static int fec_alloc_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio) fio 310 drivers/md/dm-verity-fec.c if (!fio->rs) fio 311 drivers/md/dm-verity-fec.c fio->rs = mempool_alloc(&v->fec->rs_pool, GFP_NOIO); fio 314 drivers/md/dm-verity-fec.c if (fio->bufs[n]) fio 317 drivers/md/dm-verity-fec.c fio->bufs[n] = mempool_alloc(&v->fec->prealloc_pool, GFP_NOWAIT); fio 318 drivers/md/dm-verity-fec.c if (unlikely(!fio->bufs[n])) { fio 325 drivers/md/dm-verity-fec.c fec_for_each_extra_buffer(fio, n) { fio 326 drivers/md/dm-verity-fec.c if (fio->bufs[n]) fio 329 drivers/md/dm-verity-fec.c fio->bufs[n] = mempool_alloc(&v->fec->extra_pool, GFP_NOWAIT); fio 331 drivers/md/dm-verity-fec.c if (unlikely(!fio->bufs[n])) fio 334 drivers/md/dm-verity-fec.c fio->nbufs = n; fio 336 drivers/md/dm-verity-fec.c if (!fio->output) fio 337 drivers/md/dm-verity-fec.c fio->output = mempool_alloc(&v->fec->output_pool, GFP_NOIO); fio 346 drivers/md/dm-verity-fec.c static void fec_init_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio) fio 350 drivers/md/dm-verity-fec.c fec_for_each_buffer(fio, n) fio 351 drivers/md/dm-verity-fec.c memset(fio->bufs[n], 0, v->fec->rsn << DM_VERITY_FEC_BUF_RS_BITS); fio 353 drivers/md/dm-verity-fec.c memset(fio->erasures, 0, sizeof(fio->erasures)); fio 362 drivers/md/dm-verity-fec.c struct dm_verity_fec_io *fio, u64 rsb, u64 offset, fio 368 drivers/md/dm-verity-fec.c r = fec_alloc_bufs(v, fio); fio 373 drivers/md/dm-verity-fec.c fec_init_bufs(v, fio); fio 380 drivers/md/dm-verity-fec.c r = fec_decode_bufs(v, fio, rsb, r, pos, neras); fio 384 drivers/md/dm-verity-fec.c pos += fio->nbufs << DM_VERITY_FEC_BUF_RS_BITS; fio 388 drivers/md/dm-verity-fec.c r = verity_hash(v, verity_io_hash_req(v, io), fio->output, fio 407 drivers/md/dm-verity-fec.c struct dm_verity_fec_io *fio = fec_io(io); fio 409 drivers/md/dm-verity-fec.c memcpy(data, &fio->output[fio->output_pos], len); fio 410 drivers/md/dm-verity-fec.c fio->output_pos += len; fio 424 drivers/md/dm-verity-fec.c struct dm_verity_fec_io *fio = fec_io(io); fio 430 drivers/md/dm-verity-fec.c if (fio->level >= DM_VERITY_FEC_MAX_RECURSION) { fio 435 drivers/md/dm-verity-fec.c fio->level++; fio 464 drivers/md/dm-verity-fec.c r = fec_decode_rsb(v, io, fio, rsb, offset, false); fio 466 drivers/md/dm-verity-fec.c r = fec_decode_rsb(v, io, fio, rsb, offset, true); fio 472 drivers/md/dm-verity-fec.c memcpy(dest, fio->output, 1 << v->data_dev_block_bits); fio 474 drivers/md/dm-verity-fec.c fio->output_pos = 0; fio 479 drivers/md/dm-verity-fec.c fio->level--; fio 490 drivers/md/dm-verity-fec.c struct dm_verity_fec_io *fio = fec_io(io); fio 495 drivers/md/dm-verity-fec.c mempool_free(fio->rs, &f->rs_pool); fio 498 drivers/md/dm-verity-fec.c mempool_free(fio->bufs[n], &f->prealloc_pool); fio 500 drivers/md/dm-verity-fec.c fec_for_each_extra_buffer(fio, n) fio 501 drivers/md/dm-verity-fec.c mempool_free(fio->bufs[n], &f->extra_pool); fio 503 drivers/md/dm-verity-fec.c mempool_free(fio->output, &f->output_pool); fio 511 drivers/md/dm-verity-fec.c struct dm_verity_fec_io *fio = fec_io(io); fio 516 drivers/md/dm-verity-fec.c fio->rs = NULL; fio 517 drivers/md/dm-verity-fec.c memset(fio->bufs, 0, sizeof(fio->bufs)); fio 518 drivers/md/dm-verity-fec.c fio->nbufs = 0; fio 519 drivers/md/dm-verity-fec.c fio->output = NULL; fio 520 drivers/md/dm-verity-fec.c fio->level = 0; fio 61 fs/f2fs/checkpoint.c struct f2fs_io_info fio = { fio 74 fs/f2fs/checkpoint.c fio.op_flags &= ~REQ_META; fio 84 fs/f2fs/checkpoint.c fio.page = page; fio 86 fs/f2fs/checkpoint.c err = f2fs_submit_page_bio(&fio); fio 216 fs/f2fs/checkpoint.c struct f2fs_io_info fio = { fio 228 fs/f2fs/checkpoint.c fio.op_flags &= ~REQ_META; fio 242 fs/f2fs/checkpoint.c fio.new_blkaddr = current_nat_addr(sbi, fio 247 fs/f2fs/checkpoint.c fio.new_blkaddr = current_sit_addr(sbi, fio 253 fs/f2fs/checkpoint.c fio.new_blkaddr = blkno; fio 260 fs/f2fs/checkpoint.c fio.new_blkaddr, false); fio 268 fs/f2fs/checkpoint.c fio.page = page; fio 269 fs/f2fs/checkpoint.c f2fs_submit_page_bio(&fio); fio 286 fs/f2fs/data.c static struct bio *__bio_alloc(struct f2fs_io_info *fio, int npages) fio 288 fs/f2fs/data.c struct f2fs_sb_info *sbi = fio->sbi; fio 293 fs/f2fs/data.c f2fs_target_device(sbi, fio->new_blkaddr, bio); fio 294 fs/f2fs/data.c if (is_read_io(fio->op)) { fio 301 fs/f2fs/data.c fio->type, fio->temp); fio 303 fs/f2fs/data.c if (fio->io_wbc) fio 304 fs/f2fs/data.c wbc_init_bio(fio->io_wbc, bio); fio 361 fs/f2fs/data.c struct f2fs_io_info *fio = &io->fio; fio 366 fs/f2fs/data.c bio_set_op_attrs(io->bio, fio->op, fio->op_flags); fio 368 fs/f2fs/data.c if (is_read_io(fio->op)) fio 369 fs/f2fs/data.c trace_f2fs_prepare_read_bio(io->sbi->sb, fio->type, io->bio); fio 371 fs/f2fs/data.c trace_f2fs_prepare_write_bio(io->sbi->sb, fio->type, io->bio); fio 373 fs/f2fs/data.c __submit_bio(io->sbi, io->bio, fio->type); fio 417 fs/f2fs/data.c io->fio.type = META_FLUSH; fio 418 fs/f2fs/data.c io->fio.op = REQ_OP_WRITE; fio 419 fs/f2fs/data.c io->fio.op_flags = REQ_META | REQ_PRIO | REQ_SYNC; fio 421 fs/f2fs/data.c io->fio.op_flags |= REQ_PREFLUSH | REQ_FUA; fio 475 fs/f2fs/data.c int f2fs_submit_page_bio(struct f2fs_io_info *fio) fio 478 fs/f2fs/data.c struct page *page = fio->encrypted_page ? fio 479 fs/f2fs/data.c fio->encrypted_page : fio->page; fio 481 fs/f2fs/data.c if (!f2fs_is_valid_blkaddr(fio->sbi, fio->new_blkaddr, fio 482 fs/f2fs/data.c fio->is_por ? META_POR : (__is_meta_io(fio) ? fio 486 fs/f2fs/data.c trace_f2fs_submit_page_bio(page, fio); fio 487 fs/f2fs/data.c f2fs_trace_ios(fio, 0); fio 490 fs/f2fs/data.c bio = __bio_alloc(fio, 1); fio 497 fs/f2fs/data.c if (fio->io_wbc && !is_read_io(fio->op)) fio 498 fs/f2fs/data.c wbc_account_cgroup_owner(fio->io_wbc, page, PAGE_SIZE); fio 500 fs/f2fs/data.c bio_set_op_attrs(bio, fio->op, fio->op_flags); fio 502 fs/f2fs/data.c inc_page_count(fio->sbi, is_read_io(fio->op) ? fio 503 fs/f2fs/data.c __read_io_type(page): WB_DATA_TYPE(fio->page)); fio 505 fs/f2fs/data.c __submit_bio(fio->sbi, bio, fio->type); fio 518 fs/f2fs/data.c struct f2fs_io_info *fio) fio 520 fs/f2fs/data.c if (io->fio.op != fio->op) fio 522 fs/f2fs/data.c return io->fio.op_flags == fio->op_flags; fio 527 fs/f2fs/data.c struct f2fs_io_info *fio, fio 531 fs/f2fs/data.c if (F2FS_IO_ALIGNED(sbi) && (fio->type == DATA || fio->type == NODE)) { fio 543 fs/f2fs/data.c return io_type_is_mergeable(io, fio); fio 546 fs/f2fs/data.c int f2fs_merge_page_bio(struct f2fs_io_info *fio) fio 548 fs/f2fs/data.c struct bio *bio = *fio->bio; fio 549 fs/f2fs/data.c struct page *page = fio->encrypted_page ? fio 550 fs/f2fs/data.c fio->encrypted_page : fio->page; fio 552 fs/f2fs/data.c if (!f2fs_is_valid_blkaddr(fio->sbi, fio->new_blkaddr, fio 553 fs/f2fs/data.c __is_meta_io(fio) ? META_GENERIC : DATA_GENERIC)) fio 556 fs/f2fs/data.c trace_f2fs_submit_page_bio(page, fio); fio 557 fs/f2fs/data.c f2fs_trace_ios(fio, 0); fio 559 fs/f2fs/data.c if (bio && !page_is_mergeable(fio->sbi, bio, *fio->last_block, fio 560 fs/f2fs/data.c fio->new_blkaddr)) { fio 561 fs/f2fs/data.c __submit_bio(fio->sbi, bio, fio->type); fio 566 fs/f2fs/data.c bio = __bio_alloc(fio, BIO_MAX_PAGES); fio 567 fs/f2fs/data.c bio_set_op_attrs(bio, fio->op, fio->op_flags); fio 571 fs/f2fs/data.c __submit_bio(fio->sbi, bio, fio->type); fio 576 fs/f2fs/data.c if (fio->io_wbc) fio 577 fs/f2fs/data.c wbc_account_cgroup_owner(fio->io_wbc, page, PAGE_SIZE); fio 579 fs/f2fs/data.c inc_page_count(fio->sbi, WB_DATA_TYPE(page)); fio 581 fs/f2fs/data.c *fio->last_block = fio->new_blkaddr; fio 582 fs/f2fs/data.c *fio->bio = bio; fio 600 fs/f2fs/data.c void f2fs_submit_page_write(struct f2fs_io_info *fio) fio 602 fs/f2fs/data.c struct f2fs_sb_info *sbi = fio->sbi; fio 603 fs/f2fs/data.c enum page_type btype = PAGE_TYPE_OF_BIO(fio->type); fio 604 fs/f2fs/data.c struct f2fs_bio_info *io = sbi->write_io[btype] + fio->temp; fio 607 fs/f2fs/data.c f2fs_bug_on(sbi, is_read_io(fio->op)); fio 611 fs/f2fs/data.c if (fio->in_list) { fio 617 fs/f2fs/data.c fio = list_first_entry(&io->io_list, fio 619 fs/f2fs/data.c list_del(&fio->list); fio 623 fs/f2fs/data.c verify_fio_blkaddr(fio); fio 625 fs/f2fs/data.c bio_page = fio->encrypted_page ? fio->encrypted_page : fio->page; fio 628 fs/f2fs/data.c fio->submitted = true; fio 632 fs/f2fs/data.c if (io->bio && !io_is_mergeable(sbi, io->bio, io, fio, fio 633 fs/f2fs/data.c io->last_block_in_bio, fio->new_blkaddr)) fio 638 fs/f2fs/data.c (fio->type == DATA || fio->type == NODE) && fio 639 fs/f2fs/data.c fio->new_blkaddr & F2FS_IO_SIZE_MASK(sbi)) { fio 641 fs/f2fs/data.c fio->retry = true; fio 644 fs/f2fs/data.c io->bio = __bio_alloc(fio, BIO_MAX_PAGES); fio 645 fs/f2fs/data.c io->fio = *fio; fio 653 fs/f2fs/data.c if (fio->io_wbc) fio 654 fs/f2fs/data.c wbc_account_cgroup_owner(fio->io_wbc, bio_page, PAGE_SIZE); fio 656 fs/f2fs/data.c io->last_block_in_bio = fio->new_blkaddr; fio 657 fs/f2fs/data.c f2fs_trace_ios(fio, 0); fio 659 fs/f2fs/data.c trace_f2fs_submit_page_write(fio->page, fio); fio 661 fs/f2fs/data.c if (fio->in_list) fio 1845 fs/f2fs/data.c static int encrypt_one_page(struct f2fs_io_info *fio) fio 1847 fs/f2fs/data.c struct inode *inode = fio->page->mapping->host; fio 1855 fs/f2fs/data.c f2fs_wait_on_block_writeback(inode, fio->old_blkaddr); fio 1858 fs/f2fs/data.c fio->encrypted_page = fscrypt_encrypt_pagecache_blocks(fio->page, fio 1861 fs/f2fs/data.c if (IS_ERR(fio->encrypted_page)) { fio 1863 fs/f2fs/data.c if (PTR_ERR(fio->encrypted_page) == -ENOMEM) { fio 1864 fs/f2fs/data.c f2fs_flush_merged_writes(fio->sbi); fio 1869 fs/f2fs/data.c return PTR_ERR(fio->encrypted_page); fio 1872 fs/f2fs/data.c mpage = find_lock_page(META_MAPPING(fio->sbi), fio->old_blkaddr); fio 1876 fs/f2fs/data.c page_address(fio->encrypted_page), PAGE_SIZE); fio 1883 fs/f2fs/data.c struct f2fs_io_info *fio) fio 1903 fs/f2fs/data.c fio && fio->op == REQ_OP_WRITE && fio 1904 fs/f2fs/data.c !(fio->op_flags & REQ_SYNC) && fio 1913 fs/f2fs/data.c if (unlikely(fio && is_sbi_flag_set(sbi, SBI_CP_DISABLED) && fio 1914 fs/f2fs/data.c !f2fs_is_checkpointed_data(sbi, fio->old_blkaddr))) fio 1920 fs/f2fs/data.c bool f2fs_should_update_inplace(struct inode *inode, struct f2fs_io_info *fio) fio 1929 fs/f2fs/data.c return check_inplace_update_policy(inode, fio); fio 1932 fs/f2fs/data.c bool f2fs_should_update_outplace(struct inode *inode, struct f2fs_io_info *fio) fio 1944 fs/f2fs/data.c if (fio) { fio 1945 fs/f2fs/data.c if (is_cold_data(fio->page)) fio 1947 fs/f2fs/data.c if (IS_ATOMIC_WRITTEN_PAGE(fio->page)) fio 1950 fs/f2fs/data.c f2fs_is_checkpointed_data(sbi, fio->old_blkaddr))) fio 1956 fs/f2fs/data.c static inline bool need_inplace_update(struct f2fs_io_info *fio) fio 1958 fs/f2fs/data.c struct inode *inode = fio->page->mapping->host; fio 1960 fs/f2fs/data.c if (f2fs_should_update_outplace(inode, fio)) fio 1963 fs/f2fs/data.c return f2fs_should_update_inplace(inode, fio); fio 1966 fs/f2fs/data.c int f2fs_do_write_data_page(struct f2fs_io_info *fio) fio 1968 fs/f2fs/data.c struct page *page = fio->page; fio 1977 fs/f2fs/data.c if (need_inplace_update(fio) && fio 1979 fs/f2fs/data.c fio->old_blkaddr = ei.blk + page->index - ei.fofs; fio 1981 fs/f2fs/data.c if (!f2fs_is_valid_blkaddr(fio->sbi, fio->old_blkaddr, fio 1986 fs/f2fs/data.c fio->need_lock = LOCK_DONE; fio 1991 fs/f2fs/data.c if (fio->need_lock == LOCK_REQ && !f2fs_trylock_op(fio->sbi)) fio 1998 fs/f2fs/data.c fio->old_blkaddr = dn.data_blkaddr; fio 2001 fs/f2fs/data.c if (fio->old_blkaddr == NULL_ADDR) { fio 2007 fs/f2fs/data.c if (__is_valid_data_blkaddr(fio->old_blkaddr) && fio 2008 fs/f2fs/data.c !f2fs_is_valid_blkaddr(fio->sbi, fio->old_blkaddr, fio 2018 fs/f2fs/data.c (__is_valid_data_blkaddr(fio->old_blkaddr) && fio 2019 fs/f2fs/data.c need_inplace_update(fio))) { fio 2020 fs/f2fs/data.c err = encrypt_one_page(fio); fio 2027 fs/f2fs/data.c if (fio->need_lock == LOCK_REQ) fio 2028 fs/f2fs/data.c f2fs_unlock_op(fio->sbi); fio 2029 fs/f2fs/data.c err = f2fs_inplace_write_data(fio); fio 2032 fs/f2fs/data.c fscrypt_finalize_bounce_page(&fio->encrypted_page); fio 2038 fs/f2fs/data.c trace_f2fs_do_write_data_page(fio->page, IPU); fio 2042 fs/f2fs/data.c if (fio->need_lock == LOCK_RETRY) { fio 2043 fs/f2fs/data.c if (!f2fs_trylock_op(fio->sbi)) { fio 2047 fs/f2fs/data.c fio->need_lock = LOCK_REQ; fio 2050 fs/f2fs/data.c err = f2fs_get_node_info(fio->sbi, dn.nid, &ni); fio 2054 fs/f2fs/data.c fio->version = ni.version; fio 2056 fs/f2fs/data.c err = encrypt_one_page(fio); fio 2064 fs/f2fs/data.c f2fs_outplace_write_data(&dn, fio); fio 2072 fs/f2fs/data.c if (fio->need_lock == LOCK_REQ) fio 2073 fs/f2fs/data.c f2fs_unlock_op(fio->sbi); fio 2092 fs/f2fs/data.c struct f2fs_io_info fio = { fio 2149 fs/f2fs/data.c fio.need_lock = LOCK_DONE; fio 2150 fs/f2fs/data.c err = f2fs_do_write_data_page(&fio); fio 2169 fs/f2fs/data.c err = f2fs_do_write_data_page(&fio); fio 2171 fs/f2fs/data.c fio.need_lock = LOCK_REQ; fio 2172 fs/f2fs/data.c err = f2fs_do_write_data_page(&fio); fio 2217 fs/f2fs/data.c *submitted = fio.submitted; fio 1077 fs/f2fs/f2fs.h struct f2fs_io_info fio; /* store buffered io info. */ fio 2880 fs/f2fs/f2fs.h #define __is_meta_io(fio) (PAGE_TYPE_OF_BIO((fio)->type) == META) fio 3123 fs/f2fs/f2fs.h void f2fs_do_write_node_page(unsigned int nid, struct f2fs_io_info *fio); fio 3125 fs/f2fs/f2fs.h struct f2fs_io_info *fio); fio 3126 fs/f2fs/f2fs.h int f2fs_inplace_write_data(struct f2fs_io_info *fio); fio 3137 fs/f2fs/f2fs.h struct f2fs_io_info *fio, bool add_list); fio 3205 fs/f2fs/f2fs.h int f2fs_submit_page_bio(struct f2fs_io_info *fio); fio 3206 fs/f2fs/f2fs.h int f2fs_merge_page_bio(struct f2fs_io_info *fio); fio 3207 fs/f2fs/f2fs.h void f2fs_submit_page_write(struct f2fs_io_info *fio); fio 3225 fs/f2fs/f2fs.h int f2fs_do_write_data_page(struct f2fs_io_info *fio); fio 3231 fs/f2fs/f2fs.h bool f2fs_should_update_inplace(struct inode *inode, struct f2fs_io_info *fio); fio 3232 fs/f2fs/f2fs.h bool f2fs_should_update_outplace(struct inode *inode, struct f2fs_io_info *fio); fio 665 fs/f2fs/gc.c struct f2fs_io_info fio = { fio 709 fs/f2fs/gc.c fio.page = page; fio 710 fs/f2fs/gc.c fio.new_blkaddr = fio.old_blkaddr = dn.data_blkaddr; fio 720 fs/f2fs/gc.c fio.encrypted_page = f2fs_pagecache_get_page(META_MAPPING(sbi), fio 723 fs/f2fs/gc.c if (!fio.encrypted_page) { fio 728 fs/f2fs/gc.c err = f2fs_submit_page_bio(&fio); fio 731 fs/f2fs/gc.c f2fs_put_page(fio.encrypted_page, 0); fio 735 fs/f2fs/gc.c f2fs_put_page(fio.encrypted_page, 1); fio 748 fs/f2fs/gc.c struct f2fs_io_info fio = { fio 765 fs/f2fs/gc.c bool lfs_mode = test_opt(fio.sbi, LFS); fio 809 fs/f2fs/gc.c err = f2fs_get_node_info(fio.sbi, dn.nid, &ni); fio 816 fs/f2fs/gc.c fio.page = page; fio 817 fs/f2fs/gc.c fio.new_blkaddr = fio.old_blkaddr = dn.data_blkaddr; fio 820 fs/f2fs/gc.c down_write(&fio.sbi->io_order_lock); fio 822 fs/f2fs/gc.c mpage = f2fs_grab_cache_page(META_MAPPING(fio.sbi), fio 823 fs/f2fs/gc.c fio.old_blkaddr, false); fio 827 fs/f2fs/gc.c fio.encrypted_page = mpage; fio 831 fs/f2fs/gc.c err = f2fs_submit_page_bio(&fio); fio 837 fs/f2fs/gc.c if (unlikely(mpage->mapping != META_MAPPING(fio.sbi) || fio 845 fs/f2fs/gc.c f2fs_allocate_data_block(fio.sbi, NULL, fio.old_blkaddr, &newaddr, fio 848 fs/f2fs/gc.c fio.encrypted_page = f2fs_pagecache_get_page(META_MAPPING(fio.sbi), fio 850 fs/f2fs/gc.c if (!fio.encrypted_page) { fio 857 fs/f2fs/gc.c f2fs_wait_on_page_writeback(fio.encrypted_page, DATA, true, true); fio 858 fs/f2fs/gc.c memcpy(page_address(fio.encrypted_page), fio 861 fs/f2fs/gc.c invalidate_mapping_pages(META_MAPPING(fio.sbi), fio 862 fs/f2fs/gc.c fio.old_blkaddr, fio.old_blkaddr); fio 864 fs/f2fs/gc.c set_page_dirty(fio.encrypted_page); fio 865 fs/f2fs/gc.c if (clear_page_dirty_for_io(fio.encrypted_page)) fio 866 fs/f2fs/gc.c dec_page_count(fio.sbi, F2FS_DIRTY_META); fio 868 fs/f2fs/gc.c set_page_writeback(fio.encrypted_page); fio 874 fs/f2fs/gc.c fio.op = REQ_OP_WRITE; fio 875 fs/f2fs/gc.c fio.op_flags = REQ_SYNC; fio 876 fs/f2fs/gc.c fio.new_blkaddr = newaddr; fio 877 fs/f2fs/gc.c f2fs_submit_page_write(&fio); fio 878 fs/f2fs/gc.c if (fio.retry) { fio 880 fs/f2fs/gc.c if (PageWriteback(fio.encrypted_page)) fio 881 fs/f2fs/gc.c end_page_writeback(fio.encrypted_page); fio 885 fs/f2fs/gc.c f2fs_update_iostat(fio.sbi, FS_GC_DATA_IO, F2FS_BLKSIZE); fio 892 fs/f2fs/gc.c f2fs_put_page(fio.encrypted_page, 1); fio 895 fs/f2fs/gc.c f2fs_do_replace_block(fio.sbi, &sum, newaddr, fio.old_blkaddr, fio 899 fs/f2fs/gc.c up_write(&fio.sbi->io_order_lock); fio 943 fs/f2fs/gc.c struct f2fs_io_info fio = { fio 969 fs/f2fs/gc.c err = f2fs_do_write_data_page(&fio); fio 112 fs/f2fs/inline.c struct f2fs_io_info fio = { fio 132 fs/f2fs/inline.c err = f2fs_get_node_info(fio.sbi, dn->nid, &ni); fio 139 fs/f2fs/inline.c fio.version = ni.version; fio 143 fs/f2fs/inline.c set_sbi_flag(fio.sbi, SBI_NEED_FSCK); fio 144 fs/f2fs/inline.c f2fs_warn(fio.sbi, "%s: corrupted inline inode ino=%lx, i_addr[0]:0x%x, run fsck to fix.", fio 160 fs/f2fs/inline.c fio.old_blkaddr = dn->data_blkaddr; fio 162 fs/f2fs/inline.c f2fs_outplace_write_data(dn, &fio); fio 1278 fs/f2fs/node.c struct f2fs_io_info fio = { fio 1306 fs/f2fs/node.c fio.new_blkaddr = fio.old_blkaddr = ni.blk_addr; fio 1307 fs/f2fs/node.c return f2fs_submit_page_bio(&fio); fio 1505 fs/f2fs/node.c struct f2fs_io_info fio = { fio 1563 fs/f2fs/node.c fio.op_flags |= REQ_PREFLUSH | REQ_FUA; fio 1575 fs/f2fs/node.c fio.old_blkaddr = ni.blk_addr; fio 1576 fs/f2fs/node.c f2fs_do_write_node_page(nid, &fio); fio 1577 fs/f2fs/node.c set_node_addr(sbi, &ni, fio.new_blkaddr, is_fsync_dnode(page)); fio 1593 fs/f2fs/node.c *submitted = fio.submitted; fio 383 fs/f2fs/segment.c struct f2fs_io_info fio = { fio 412 fs/f2fs/segment.c fio.page = page; fio 413 fs/f2fs/segment.c fio.old_blkaddr = NULL_ADDR; fio 414 fs/f2fs/segment.c fio.encrypted_page = NULL; fio 415 fs/f2fs/segment.c fio.need_lock = LOCK_DONE; fio 416 fs/f2fs/segment.c err = f2fs_do_write_data_page(&fio); fio 427 fs/f2fs/segment.c cur->old_addr = fio.old_blkaddr; fio 3000 fs/f2fs/segment.c static int __get_segment_type_2(struct f2fs_io_info *fio) fio 3002 fs/f2fs/segment.c if (fio->type == DATA) fio 3008 fs/f2fs/segment.c static int __get_segment_type_4(struct f2fs_io_info *fio) fio 3010 fs/f2fs/segment.c if (fio->type == DATA) { fio 3011 fs/f2fs/segment.c struct inode *inode = fio->page->mapping->host; fio 3018 fs/f2fs/segment.c if (IS_DNODE(fio->page) && is_cold_node(fio->page)) fio 3025 fs/f2fs/segment.c static int __get_segment_type_6(struct f2fs_io_info *fio) fio 3027 fs/f2fs/segment.c if (fio->type == DATA) { fio 3028 fs/f2fs/segment.c struct inode *inode = fio->page->mapping->host; fio 3030 fs/f2fs/segment.c if (is_cold_data(fio->page) || file_is_cold(inode)) fio 3039 fs/f2fs/segment.c if (IS_DNODE(fio->page)) fio 3040 fs/f2fs/segment.c return is_cold_node(fio->page) ? CURSEG_WARM_NODE : fio 3046 fs/f2fs/segment.c static int __get_segment_type(struct f2fs_io_info *fio) fio 3050 fs/f2fs/segment.c switch (F2FS_OPTION(fio->sbi).active_logs) { fio 3052 fs/f2fs/segment.c type = __get_segment_type_2(fio); fio 3055 fs/f2fs/segment.c type = __get_segment_type_4(fio); fio 3058 fs/f2fs/segment.c type = __get_segment_type_6(fio); fio 3061 fs/f2fs/segment.c f2fs_bug_on(fio->sbi, true); fio 3065 fs/f2fs/segment.c fio->temp = HOT; fio 3067 fs/f2fs/segment.c fio->temp = WARM; fio 3069 fs/f2fs/segment.c fio->temp = COLD; fio 3076 fs/f2fs/segment.c struct f2fs_io_info *fio, bool add_list) fio 3129 fs/f2fs/segment.c fio->retry = false; fio 3134 fs/f2fs/segment.c INIT_LIST_HEAD(&fio->list); fio 3135 fs/f2fs/segment.c fio->in_list = true; fio 3136 fs/f2fs/segment.c io = sbi->write_io[fio->type] + fio->temp; fio 3138 fs/f2fs/segment.c list_add_tail(&fio->list, &io->io_list); fio 3147 fs/f2fs/segment.c static void update_device_state(struct f2fs_io_info *fio) fio 3149 fs/f2fs/segment.c struct f2fs_sb_info *sbi = fio->sbi; fio 3155 fs/f2fs/segment.c devidx = f2fs_target_device_index(sbi, fio->new_blkaddr); fio 3158 fs/f2fs/segment.c f2fs_set_dirty_device(sbi, fio->ino, devidx, FLUSH_INO); fio 3168 fs/f2fs/segment.c static void do_write_page(struct f2fs_summary *sum, struct f2fs_io_info *fio) fio 3170 fs/f2fs/segment.c int type = __get_segment_type(fio); fio 3171 fs/f2fs/segment.c bool keep_order = (test_opt(fio->sbi, LFS) && type == CURSEG_COLD_DATA); fio 3174 fs/f2fs/segment.c down_read(&fio->sbi->io_order_lock); fio 3176 fs/f2fs/segment.c f2fs_allocate_data_block(fio->sbi, fio->page, fio->old_blkaddr, fio 3177 fs/f2fs/segment.c &fio->new_blkaddr, sum, type, fio, true); fio 3178 fs/f2fs/segment.c if (GET_SEGNO(fio->sbi, fio->old_blkaddr) != NULL_SEGNO) fio 3179 fs/f2fs/segment.c invalidate_mapping_pages(META_MAPPING(fio->sbi), fio 3180 fs/f2fs/segment.c fio->old_blkaddr, fio->old_blkaddr); fio 3183 fs/f2fs/segment.c f2fs_submit_page_write(fio); fio 3184 fs/f2fs/segment.c if (fio->retry) { fio 3185 fs/f2fs/segment.c fio->old_blkaddr = fio->new_blkaddr; fio 3189 fs/f2fs/segment.c update_device_state(fio); fio 3192 fs/f2fs/segment.c up_read(&fio->sbi->io_order_lock); fio 3198 fs/f2fs/segment.c struct f2fs_io_info fio = { fio 3212 fs/f2fs/segment.c fio.op_flags &= ~REQ_META; fio 3216 fs/f2fs/segment.c f2fs_submit_page_write(&fio); fio 3222 fs/f2fs/segment.c void f2fs_do_write_node_page(unsigned int nid, struct f2fs_io_info *fio) fio 3227 fs/f2fs/segment.c do_write_page(&sum, fio); fio 3229 fs/f2fs/segment.c f2fs_update_iostat(fio->sbi, fio->io_type, F2FS_BLKSIZE); fio 3233 fs/f2fs/segment.c struct f2fs_io_info *fio) fio 3235 fs/f2fs/segment.c struct f2fs_sb_info *sbi = fio->sbi; fio 3239 fs/f2fs/segment.c set_summary(&sum, dn->nid, dn->ofs_in_node, fio->version); fio 3240 fs/f2fs/segment.c do_write_page(&sum, fio); fio 3241 fs/f2fs/segment.c f2fs_update_data_blkaddr(dn, fio->new_blkaddr); fio 3243 fs/f2fs/segment.c f2fs_update_iostat(sbi, fio->io_type, F2FS_BLKSIZE); fio 3246 fs/f2fs/segment.c int f2fs_inplace_write_data(struct f2fs_io_info *fio) fio 3249 fs/f2fs/segment.c struct f2fs_sb_info *sbi = fio->sbi; fio 3252 fs/f2fs/segment.c fio->new_blkaddr = fio->old_blkaddr; fio 3254 fs/f2fs/segment.c __get_segment_type(fio); fio 3256 fs/f2fs/segment.c segno = GET_SEGNO(sbi, fio->new_blkaddr); fio 3265 fs/f2fs/segment.c stat_inc_inplace_blocks(fio->sbi); fio 3267 fs/f2fs/segment.c if (fio->bio) fio 3268 fs/f2fs/segment.c err = f2fs_merge_page_bio(fio); fio 3270 fs/f2fs/segment.c err = f2fs_submit_page_bio(fio); fio 3272 fs/f2fs/segment.c update_device_state(fio); fio 3273 fs/f2fs/segment.c f2fs_update_iostat(fio->sbi, fio->io_type, F2FS_BLKSIZE); fio 663 fs/f2fs/segment.h static inline void verify_fio_blkaddr(struct f2fs_io_info *fio) fio 665 fs/f2fs/segment.h struct f2fs_sb_info *sbi = fio->sbi; fio 667 fs/f2fs/segment.h if (__is_valid_data_blkaddr(fio->old_blkaddr)) fio 668 fs/f2fs/segment.h verify_blkaddr(sbi, fio->old_blkaddr, __is_meta_io(fio) ? fio 670 fs/f2fs/segment.h verify_blkaddr(sbi, fio->new_blkaddr, __is_meta_io(fio) ? fio 29 fs/f2fs/trace.c last_io.fio.op, last_io.fio.op_flags, fio 30 fs/f2fs/trace.c last_io.fio.new_blkaddr, fio 87 fs/f2fs/trace.c void f2fs_trace_ios(struct f2fs_io_info *fio, int flush) fio 98 fs/f2fs/trace.c inode = fio->page->mapping->host; fio 99 fs/f2fs/trace.c pid = page_private(fio->page); fio 107 fs/f2fs/trace.c last_io.fio.op == fio->op && fio 108 fs/f2fs/trace.c last_io.fio.op_flags == fio->op_flags && fio 109 fs/f2fs/trace.c last_io.fio.new_blkaddr + last_io.len == fio 110 fs/f2fs/trace.c fio->new_blkaddr) { fio 121 fs/f2fs/trace.c last_io.fio = *fio; fio 28 fs/f2fs/trace.h struct f2fs_io_info fio; fio 1005 include/trace/events/f2fs.h TP_PROTO(struct page *page, struct f2fs_io_info *fio), fio 1007 include/trace/events/f2fs.h TP_ARGS(page, fio), fio 1025 include/trace/events/f2fs.h __entry->old_blkaddr = fio->old_blkaddr; fio 1026 include/trace/events/f2fs.h __entry->new_blkaddr = fio->new_blkaddr; fio 1027 include/trace/events/f2fs.h __entry->op = fio->op; fio 1028 include/trace/events/f2fs.h __entry->op_flags = fio->op_flags; fio 1029 include/trace/events/f2fs.h __entry->temp = fio->temp; fio 1030 include/trace/events/f2fs.h __entry->type = fio->type; fio 1046 include/trace/events/f2fs.h TP_PROTO(struct page *page, struct f2fs_io_info *fio), fio 1048 include/trace/events/f2fs.h TP_ARGS(page, fio), fio 1055 include/trace/events/f2fs.h TP_PROTO(struct page *page, struct f2fs_io_info *fio), fio 1057 include/trace/events/f2fs.h TP_ARGS(page, fio),