/* be sure to wait for any on-going discard commands */ dropped = f2fs_wait_discard_bios(sbi); if (f2fs_discard_en(sbi) && !sbi->discard_blks && !dropped) { struct cp_control cpc = { .reason = CP_UMOUNT | CP_TRIMMED, }; ......
struct sit_info *sit_i = SIT_I(sbi); struct curseg_info *curseg = CURSEG_I(sbi, type); down_read(&SM_I(sbi)->curseg_lock); mutex_lock(&curseg->curseg_mutex); down_write(&sit_i->sentry_lock); *new_blkaddr = NEXT_FREE_BLKADDR(sbi, curseg); f2fs_wait_discard_bio(sbi,...
static void __queue_discard_cmd(struct f2fs_sb_info *sbi, struct block_device *bdev, block_t blkstart, block_t blklen) { @@ -1724,6 +1783,19 @@ static void f2fs_wait_discard_bio(struct f2fs_sb_info *sbi, block_t blkaddr) mutex_lock(&dcc->cmd_lock); dc = __lookup_discard...
/* Here, we have one bio having CP pack except cp pack 2 page */ f2fs_sync_meta_pages(sbi, META, LONG_MAX, FS_CP_META_IO); f2fs_bug_on(sbi, get_pages(sbi, F2FS_DIRTY_META) && !f2fs_cp_error(sbi)); /* Wait for all dirty meta pages to be submitted for IO */ f2fs_wait...
struct bio *bio; int ret, err = 0;BUG_ON(inode->i_sb->s_blocksize != PAGE_SIZE);ctx = fscrypt_get_ctx(inode, GFP_NOFS); if (IS_ERR(ctx)) return PTR_ERR(ctx);ciphertext_page = fscrypt_alloc_bounce_page(ctx, GFP_NOWAIT); ...
f2fs_wait_all_discard_bio(sbi); if (err) { release_discard_addrs(sbi); } else { clear_prefree_segments(sbi, cpc); f2fs_wait_all_discard_bio(sbi); } unblock_operations(sbi); stat_inc_cp_count(sbi->stat_info); Expand Down 192 changes: 127 additions & 65 deletions 192 fs/f2fs/...
struct bio *bio; int ret, err = 0;BUG_ON(inode->i_sb->s_blocksize != PAGE_SIZE);ctx = fscrypt_get_ctx(inode, GFP_NOFS); if (IS_ERR(ctx)) return PTR_ERR(ctx);ciphertext_page = fscrypt_alloc_bounce_page(ctx, GFP_NOWAIT); ...
f2fs_wait_on_block_writeback(sbi, blkaddr); }bio = bio_alloc(GFP_KERNEL, min_t(int, nr_pages, BIO_MAX_PAGES)); bio = f2fs_bio_alloc(sbi, min_t(int, nr_pages, BIO_MAX_PAGES), false); if (!bio) { if (ctx) fscrypt_release_ctx(ctx); ...
/* Here, we have one bio having CP pack except cp pack 2 page */ f2fs_sync_meta_pages(sbi, META, LONG_MAX, FS_CP_META_IO); /* Wait for all dirty meta pages to be submitted for IO */ @@ -1718,6 +1718,7 @@ int f2fs_write_checkpoint(struct f2fs_sb_info *sbi, struct cp...