* [PATCH] ext2: fix error msg when mounting fs with too-large blocksize
@ 2011-04-24 6:36 Robin Dong
2011-04-24 7:17 ` Coly Li
2011-04-25 15:11 ` Eric Sandeen
0 siblings, 2 replies; 5+ messages in thread
From: Robin Dong @ 2011-04-24 6:36 UTC (permalink / raw)
To: linux-ext4; +Cc: Robin Dong
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.
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;
}
--
1.7.3.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ext2: fix error msg when mounting fs with too-large blocksize
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
2011-04-25 15:11 ` Eric Sandeen
1 sibling, 0 replies; 5+ messages in thread
From: Coly Li @ 2011-04-24 7:17 UTC (permalink / raw)
To: Robin Dong; +Cc: linux-ext4
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ext2: fix error msg when mounting fs with too-large blocksize
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
@ 2011-04-25 15:11 ` Eric Sandeen
1 sibling, 0 replies; 5+ messages in thread
From: Eric Sandeen @ 2011-04-25 15:11 UTC (permalink / raw)
To: Robin Dong; +Cc: linux-ext4, Robin Dong
On 4/24/11 1:36 AM, 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.
I couldn't have said it better myself :) As long as you're ok with not having the extra error message you originally had, for now ...
Reviewed-by: Eric Sandeen <sandeen@redhat.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;
> }
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ext2: fix error msg when mounting fs with too-large blocksize
@ 2011-05-05 2:44 Robin Dong
2011-05-05 11:23 ` Jan Kara
0 siblings, 1 reply; 5+ messages in thread
From: Robin Dong @ 2011-05-05 2:44 UTC (permalink / raw)
To: linux-ext4, linux-ext4; +Cc: Robin Dong, Jan Kara
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.
Signed-off-by: Robin Dong <sanbai@taobao.com>
Reviewed-by: Coly Li <bosong.ly@taobao.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.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 d89e0b6..8dfae33 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -882,7 +882,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;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ext2: fix error msg when mounting fs with too-large blocksize
2011-05-05 2:44 Robin Dong
@ 2011-05-05 11:23 ` Jan Kara
0 siblings, 0 replies; 5+ messages in thread
From: Jan Kara @ 2011-05-05 11:23 UTC (permalink / raw)
To: Robin Dong; +Cc: linux-ext4, Robin Dong, Jan Kara
On Thu 05-05-11 10:44:04, Robin Dong wrote:
> 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.
>
> Signed-off-by: Robin Dong <sanbai@taobao.com>
> Reviewed-by: Coly Li <bosong.ly@taobao.com>
> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Thanks. Merged into my tree.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-05 11:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).