mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
f2fs: don't start checkpoint thread in readonly mountpoint
In readonly mountpoint, there should be no write IOs include checkpoint IO, so that it's not needed to create kernel checkpoint thread. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
f7dca8471d
commit
a940a9ad96
|
|
@ -2072,8 +2072,10 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!test_opt(sbi, DISABLE_CHECKPOINT) &&
|
if ((*flags & SB_RDONLY) || test_opt(sbi, DISABLE_CHECKPOINT) ||
|
||||||
test_opt(sbi, MERGE_CHECKPOINT)) {
|
!test_opt(sbi, MERGE_CHECKPOINT)) {
|
||||||
|
f2fs_stop_ckpt_thread(sbi);
|
||||||
|
} else {
|
||||||
err = f2fs_start_ckpt_thread(sbi);
|
err = f2fs_start_ckpt_thread(sbi);
|
||||||
if (err) {
|
if (err) {
|
||||||
f2fs_err(sbi,
|
f2fs_err(sbi,
|
||||||
|
|
@ -2081,8 +2083,6 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
|
||||||
err);
|
err);
|
||||||
goto restore_gc;
|
goto restore_gc;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
f2fs_stop_ckpt_thread(sbi);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -3838,7 +3838,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
|
||||||
|
|
||||||
/* setup checkpoint request control and start checkpoint issue thread */
|
/* setup checkpoint request control and start checkpoint issue thread */
|
||||||
f2fs_init_ckpt_req_control(sbi);
|
f2fs_init_ckpt_req_control(sbi);
|
||||||
if (!test_opt(sbi, DISABLE_CHECKPOINT) &&
|
if (!f2fs_readonly(sb) && !test_opt(sbi, DISABLE_CHECKPOINT) &&
|
||||||
test_opt(sbi, MERGE_CHECKPOINT)) {
|
test_opt(sbi, MERGE_CHECKPOINT)) {
|
||||||
err = f2fs_start_ckpt_thread(sbi);
|
err = f2fs_start_ckpt_thread(sbi);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user