Lines Matching refs:cpc
1300 static void update_ckpt_flags(struct f2fs_sb_info *sbi, struct cp_control *cpc) in update_ckpt_flags() argument
1306 if (cpc->reason & CP_UMOUNT) { in update_ckpt_flags()
1321 if (cpc->reason & CP_TRIMMED) in update_ckpt_flags()
1326 if (cpc->reason & CP_UMOUNT) in update_ckpt_flags()
1331 if (cpc->reason & CP_FASTBOOT) in update_ckpt_flags()
1431 static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) in do_checkpoint() argument
1481 if (__remain_node_summaries(cpc->reason)) in do_checkpoint()
1491 update_ckpt_flags(sbi, cpc); in do_checkpoint()
1505 if ((cpc->reason & CP_UMOUNT) && in do_checkpoint()
1540 if (__remain_node_summaries(cpc->reason)) { in do_checkpoint()
1602 int f2fs_write_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) in f2fs_write_checkpoint() argument
1612 if (cpc->reason != CP_PAUSE) in f2fs_write_checkpoint()
1616 if (cpc->reason != CP_RESIZE) in f2fs_write_checkpoint()
1620 ((cpc->reason & CP_FASTBOOT) || (cpc->reason & CP_SYNC) || in f2fs_write_checkpoint()
1621 ((cpc->reason & CP_DISCARD) && !sbi->discard_blks))) in f2fs_write_checkpoint()
1628 trace_f2fs_write_checkpoint(sbi->sb, cpc->reason, "start block_ops"); in f2fs_write_checkpoint()
1634 trace_f2fs_write_checkpoint(sbi->sb, cpc->reason, "finish block_ops"); in f2fs_write_checkpoint()
1639 if (cpc->reason & CP_DISCARD) { in f2fs_write_checkpoint()
1640 if (!f2fs_exist_trim_candidates(sbi, cpc)) { in f2fs_write_checkpoint()
1648 f2fs_flush_sit_entries(sbi, cpc); in f2fs_write_checkpoint()
1649 f2fs_clear_prefree_segments(sbi, cpc); in f2fs_write_checkpoint()
1664 err = f2fs_flush_nat_entries(sbi, cpc); in f2fs_write_checkpoint()
1671 f2fs_flush_sit_entries(sbi, cpc); in f2fs_write_checkpoint()
1676 err = do_checkpoint(sbi, cpc); in f2fs_write_checkpoint()
1682 f2fs_clear_prefree_segments(sbi, cpc); in f2fs_write_checkpoint()
1690 if (cpc->reason & CP_RECOVERY) in f2fs_write_checkpoint()
1695 trace_f2fs_write_checkpoint(sbi->sb, cpc->reason, "finish checkpoint"); in f2fs_write_checkpoint()
1697 if (cpc->reason != CP_RESIZE) in f2fs_write_checkpoint()
1743 struct cp_control cpc = { .reason = CP_SYNC, }; in __write_checkpoint_sync() local
1747 err = f2fs_write_checkpoint(sbi, &cpc); in __write_checkpoint_sync()
1830 struct cp_control cpc; in f2fs_issue_checkpoint() local
1832 cpc.reason = __get_cp_reason(sbi); in f2fs_issue_checkpoint()
1833 if (!test_opt(sbi, MERGE_CHECKPOINT) || cpc.reason != CP_SYNC) { in f2fs_issue_checkpoint()
1837 ret = f2fs_write_checkpoint(sbi, &cpc); in f2fs_issue_checkpoint()