static struct kmem_cache *ino_entry_slab;
struct kmem_cache *f2fs_inode_entry_slab;
-void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi, bool end_io,
- unsigned char reason)
-{
- f2fs_build_fault_attr(sbi, 0, 0, FAULT_ALL);
- if (!end_io)
- f2fs_flush_merged_writes(sbi);
- f2fs_handle_critical_error(sbi, reason);
-}
-
/*
* We guarantee no failure on the returned page.
*/
loff_t max_file_blocks(struct inode *inode);
void f2fs_quota_off_umount(struct super_block *sb);
void f2fs_save_errors(struct f2fs_sb_info *sbi, unsigned char flag);
-void f2fs_handle_critical_error(struct f2fs_sb_info *sbi, unsigned char reason);
void f2fs_handle_error(struct f2fs_sb_info *sbi, unsigned char error);
int f2fs_commit_super(struct f2fs_sb_info *sbi, bool recover);
int f2fs_sync_fs(struct super_block *sb, int sync);
f2fs_bug_on(sbi, 1);
return;
}
- f2fs_handle_critical_error(sbi, stop_reason);
+ f2fs_stop_checkpoint(sbi, false, stop_reason);
}
} else {
sbi->page_eio_ofs[type] = ofs;
if (f2fs_sanity_check_node_footer(sbi, folio, nid,
NODE_TYPE_REGULAR, false)) {
- f2fs_handle_critical_error(sbi, STOP_CP_REASON_CORRUPTED_NID);
+ f2fs_stop_checkpoint(sbi, false, STOP_CP_REASON_CORRUPTED_NID);
goto redirty_out;
}
|| system_state == SYSTEM_RESTART;
}
-void f2fs_handle_critical_error(struct f2fs_sb_info *sbi, unsigned char reason)
+static void f2fs_handle_critical_error(struct f2fs_sb_info *sbi,
+ unsigned char reason)
{
struct super_block *sb = sbi->sb;
bool shutdown = reason == STOP_CP_REASON_SHUTDOWN;
*/
}
+void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi, bool end_io,
+ unsigned char reason)
+{
+ f2fs_build_fault_attr(sbi, 0, 0, FAULT_ALL);
+ if (!end_io)
+ f2fs_flush_merged_writes(sbi);
+ f2fs_handle_critical_error(sbi, reason);
+}
+
+
static void f2fs_record_error_work(struct work_struct *work)
{
struct f2fs_sb_info *sbi = container_of(work,