linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: liush <liush@allwinnertech.com>
To: jaegeuk@kernel.org, chao@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, tiny.windzz@gmail.com,
	Shaohua Liu <liush@allwinnertech.com>
Subject: [PATCH 2/2] f2fs: don't check PAGE_SIZE again in sanity_check_raw_super()
Date: Mon,  7 Dec 2020 18:59:34 +0800	[thread overview]
Message-ID: <1607338774-8541-2-git-send-email-liush@allwinnertech.com> (raw)
In-Reply-To: <1607338774-8541-1-git-send-email-liush@allwinnertech.com>

From: Yangtao Li <tiny.windzz@gmail.com>

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 <tiny.windzz@gmail.com>
Signed-off-by: Shaohua Liu <liush@allwinnertech.com>
---
 fs/f2fs/super.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index d3ccf89647df..a39a81ab8dee 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2770,13 +2770,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) {
-- 
2.25.1


  reply	other threads:[~2020-12-07 11:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07 10:59 [PATCH 1/2] f2fs: convert to F2FS_*_INO macro liush
2020-12-07 10:59 ` liush [this message]
2020-12-07 15:06   ` [PATCH 2/2] f2fs: don't check PAGE_SIZE again in sanity_check_raw_super() Chao Yu
2020-12-07 15:04 ` [PATCH 1/2] f2fs: convert to F2FS_*_INO macro Chao Yu
  -- strict thread matches above, loose matches on Subject: below --
2020-12-07 10:58 liush
2020-12-07 10:58 ` [PATCH 2/2] f2fs: don't check PAGE_SIZE again in sanity_check_raw_super() liush

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1607338774-8541-2-git-send-email-liush@allwinnertech.com \
    --to=liush@allwinnertech.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiny.windzz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).