Lines Matching refs:cpc
1319 static void update_ckpt_flags(struct f2fs_sb_info *sbi, struct cp_control *cpc) in update_ckpt_flags() argument
1325 if (cpc->reason & CP_UMOUNT) { in update_ckpt_flags()
1340 if (cpc->reason & CP_TRIMMED) in update_ckpt_flags()
1345 if (cpc->reason & CP_UMOUNT) in update_ckpt_flags()
1350 if (cpc->reason & CP_FASTBOOT) in update_ckpt_flags()
1450 static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) in do_checkpoint() argument
1500 if (__remain_node_summaries(cpc->reason)) in do_checkpoint()
1510 update_ckpt_flags(sbi, cpc); in do_checkpoint()
1524 if ((cpc->reason & CP_UMOUNT) && in do_checkpoint()
1559 if (__remain_node_summaries(cpc->reason)) { in do_checkpoint()
1622 int f2fs_write_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) in f2fs_write_checkpoint() argument
1632 if (cpc->reason != CP_PAUSE) in f2fs_write_checkpoint()
1636 if (cpc->reason != CP_RESIZE) in f2fs_write_checkpoint()
1640 ((cpc->reason & CP_FASTBOOT) || (cpc->reason & CP_SYNC) || in f2fs_write_checkpoint()
1641 ((cpc->reason & CP_DISCARD) && !sbi->discard_blks))) in f2fs_write_checkpoint()
1648 trace_f2fs_write_checkpoint(sbi->sb, cpc->reason, "start block_ops"); in f2fs_write_checkpoint()
1654 trace_f2fs_write_checkpoint(sbi->sb, cpc->reason, "finish block_ops"); in f2fs_write_checkpoint()
1659 if (cpc->reason & CP_DISCARD) { in f2fs_write_checkpoint()
1660 if (!f2fs_exist_trim_candidates(sbi, cpc)) { in f2fs_write_checkpoint()
1668 f2fs_flush_sit_entries(sbi, cpc); in f2fs_write_checkpoint()
1669 f2fs_clear_prefree_segments(sbi, cpc); in f2fs_write_checkpoint()
1684 err = f2fs_flush_nat_entries(sbi, cpc); in f2fs_write_checkpoint()
1691 f2fs_flush_sit_entries(sbi, cpc); in f2fs_write_checkpoint()
1696 err = do_checkpoint(sbi, cpc); in f2fs_write_checkpoint()
1702 f2fs_clear_prefree_segments(sbi, cpc); in f2fs_write_checkpoint()
1710 if (cpc->reason & CP_RECOVERY) in f2fs_write_checkpoint()
1715 trace_f2fs_write_checkpoint(sbi->sb, cpc->reason, "finish checkpoint"); in f2fs_write_checkpoint()
1717 if (cpc->reason != CP_RESIZE) in f2fs_write_checkpoint()
1763 struct cp_control cpc = { .reason = CP_SYNC, }; in __write_checkpoint_sync() local
1767 err = f2fs_write_checkpoint(sbi, &cpc); in __write_checkpoint_sync()
1850 struct cp_control cpc; in f2fs_issue_checkpoint() local
1852 cpc.reason = __get_cp_reason(sbi); in f2fs_issue_checkpoint()
1853 if (!test_opt(sbi, MERGE_CHECKPOINT) || cpc.reason != CP_SYNC) { in f2fs_issue_checkpoint()
1857 ret = f2fs_write_checkpoint(sbi, &cpc); in f2fs_issue_checkpoint()