From: Coly Li <colyli@gmail.com>
To: Robin Dong <sanbai@taobao.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext2: fix error msg when mounting fs with too-large blocksize
Date: Sun, 24 Apr 2011 15:17:51 +0800 [thread overview]
Message-ID: <4DB3CE9F.1020201@gmail.com> (raw)
In-Reply-To: <1303626991-6704-1-git-send-email-hao.bigrat@gmail.com>
On 2011年04月24日 14:36, Robin Dong Wrote:
> From: Robin Dong <sanbai@taobao.com>
>
> When ext2 mounts a filesystem, it attempts to set the block device
> blocksize with a call to sb_set_blocksize, which can fail for
> several reasons. The current failure message in ext2 prints:
>
> EXT2-fs (loop1): error: blocksize is too small
>
> which is not correct in all cases. This can be demonstrated
> by creating a filesystem with
>
> # mkfs.ext2 -b 8192
>
> on a 4k page system, and attempting to mount it.
>
> Change the error message to a more generic:
>
> EXT2-fs (loop1): bad blocksize 8192
>
> to match the error message in ext3.
>
Reviewed-by: Coly Li <bosong.ly@taobao.com>
> Signed-off-by: Robin Dong <sanbai@taobao.com>
> ---
> fs/ext2/super.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
> index 0a78dae..1dd62ed 100644
> --- a/fs/ext2/super.c
> +++ b/fs/ext2/super.c
> @@ -898,7 +898,8 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
> brelse(bh);
>
> if (!sb_set_blocksize(sb, blocksize)) {
> - ext2_msg(sb, KERN_ERR, "error: blocksize is too small");
> + ext2_msg(sb, KERN_ERR,
> + "error: bad blocksize %d", blocksize);
> goto failed_sbi;
> }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-04-24 6:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-24 6:36 [PATCH] ext2: fix error msg when mounting fs with too-large blocksize Robin Dong
2011-04-24 7:17 ` Coly Li [this message]
2011-04-25 15:11 ` Eric Sandeen
-- strict thread matches above, loose matches on Subject: below --
2011-05-05 2:44 Robin Dong
2011-05-05 11:23 ` Jan Kara
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=4DB3CE9F.1020201@gmail.com \
--to=colyli@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sanbai@taobao.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).