[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120123164527.GA4439@thunk.org>
Date: Mon, 23 Jan 2012 11:45:27 -0500
From: Ted Ts'o <tytso@....edu>
To: Yongqiang Yang <xiaoqiangnk@...il.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH 3/3] e2fsprogs: add a function computing old desc
blocks without reserved ones
On Wed, Jan 04, 2012 at 07:02:12PM +0800, Yongqiang Yang wrote:
> If first_meta_bg > desc_blocks, ext2fs_open reads more decs_blocks,
> however desc buffer in memory is allocated based on desc_blocks.
> Maybe there are similar problems in other places, so this patch adds a
> function which computes right old_desc_blocks.
>
> The problem can be reproduced by setting first_meta_bg.
s_first_meta_bg should never be greater than desc_blocks. If it is,
the file system is corrupt. This is something that we should check in
ext2fs_open() and in e2fsck as well.
A much better thing to do would be to have ext2fs_open simply fail the
open with an EXT2_ET_CORRUPT_SUPERBLOCK error. Then e2fsck will
automatically try using the backup superblock, which will hopefully
allow the user to recover from the corrupted superblock.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists