diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-05-21 01:32:53 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-06-23 01:09:34 -0700 |
commit | a7d9fe3c33887085a2e10c085d378126314dc222 (patch) | |
tree | c530e81a73e165f8eb86cf0b4603e9851e4fd706 /fs/f2fs/segment.c | |
parent | 833dcd35453713ced96e086daecf7f023709e6a4 (diff) | |
download | linux-stable-a7d9fe3c33887085a2e10c085d378126314dc222.tar.gz linux-stable-a7d9fe3c33887085a2e10c085d378126314dc222.tar.bz2 linux-stable-a7d9fe3c33887085a2e10c085d378126314dc222.zip |
f2fs: support RO feature
Given RO feature in superblock, we don't need to check provisioning/reserve
spaces and SSA area.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 380ef34e1a59..54847eebc5ca 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -4683,6 +4683,10 @@ static int sanity_check_curseg(struct f2fs_sb_info *sbi) struct seg_entry *se = get_seg_entry(sbi, curseg->segno); unsigned int blkofs = curseg->next_blkoff; + if (f2fs_sb_has_readonly(sbi) && + i != CURSEG_HOT_DATA && i != CURSEG_HOT_NODE) + continue; + sanity_check_seg_type(sbi, curseg->seg_type); if (f2fs_test_bit(blkofs, se->cur_valid_map)) |