Skip to content

Commit

Permalink
f2fs: don't check PAGE_SIZE again in sanity_check_raw_super()
Browse files Browse the repository at this point in the history
Many flash devices read and write a single IO based on a multiple
of 4KB, and we support only 4KB page cache size now.

Since we already check page size in init_f2fs_fs(), so remove page
size check in sanity_check_raw_super().

Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Shaohua Liu <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
TinyWindzz authored and Jaegeuk Kim committed Dec 8, 2020
1 parent b9ec109 commit d540e35
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions fs/f2fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2801,13 +2801,6 @@ static int sanity_check_raw_super(struct f2fs_sb_info *sbi,
}
}

/* Currently, support only 4KB page cache size */
if (F2FS_BLKSIZE != PAGE_SIZE) {
f2fs_info(sbi, "Invalid page_cache_size (%lu), supports only 4KB",
PAGE_SIZE);
return -EFSCORRUPTED;
}

/* Currently, support only 4KB block size */
blocksize = 1 << le32_to_cpu(raw_super->log_blocksize);
if (blocksize != F2FS_BLKSIZE) {
Expand Down

0 comments on commit d540e35

Please sign in to comment.