diff options
author | majianpeng <majianpeng@gmail.com> | 2013-02-01 19:07:57 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-02-12 07:15:01 +0900 |
commit | 5c9b469295fb6b10d98923eab5e79c4edb80ed20 (patch) | |
tree | 581672ee6731fc81b6e9a2e7a6b1e0f3a0b03c82 /fs/f2fs | |
parent | f83759e28372e593879f4dd20eb6c5ba6c4f393a (diff) | |
download | blackbird-op-linux-5c9b469295fb6b10d98923eab5e79c4edb80ed20.tar.gz blackbird-op-linux-5c9b469295fb6b10d98923eab5e79c4edb80ed20.zip |
f2fs: use F2FS_BLKSIZE to judge bloksize and page_cache_size
In some system PAGE_CACHE_SIZE isn't 4K. So using F2FS_BLKSIZE to judge.
By Jaegeuk Kim:
o f2fs does not support no other 4KB page cache size.
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/super.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 0b18aee2ed25..1d7fe11fea30 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -384,14 +384,23 @@ static int sanity_check_raw_super(struct super_block *sb, return 1; } + /* Currently, support only 4KB page cache size */ + if (F2FS_BLKSIZE != PAGE_CACHE_SIZE) { + f2fs_msg(sb, KERN_INFO, + "Invalid page_cache_size (%u), supports only 4KB\n", + PAGE_CACHE_SIZE); + return 1; + } + /* Currently, support only 4KB block size */ blocksize = 1 << le32_to_cpu(raw_super->log_blocksize); - if (blocksize != PAGE_CACHE_SIZE) { + if (blocksize != F2FS_BLKSIZE) { f2fs_msg(sb, KERN_INFO, "Invalid blocksize (%u), supports only 4KB\n", blocksize); return 1; } + if (le32_to_cpu(raw_super->log_sectorsize) != F2FS_LOG_SECTOR_SIZE) { f2fs_msg(sb, KERN_INFO, "Invalid log sectorsize"); |