From: Ted Ts'o <tytso@mit.edu>
To: Yongqiang Yang <xiaoqiangnk@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 3/3] e2fsprogs: add a function computing old desc blocks without reserved ones
Date: Mon, 23 Jan 2012 11:45:27 -0500 [thread overview]
Message-ID: <20120123164527.GA4439@thunk.org> (raw)
In-Reply-To: <1325674932-26069-3-git-send-email-xiaoqiangnk@gmail.com>
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
next prev parent reply other threads:[~2012-01-23 18:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-04 11:02 [PATCH V2 1/3] mke2fs: correct help text for option -G of mke2fs Yongqiang Yang
2012-01-04 11:02 ` [PATCH 2/3] e2fsprogs: move code computing old_desc_blocks to a function Yongqiang Yang
2012-01-23 16:56 ` Ted Ts'o
2012-01-04 11:02 ` [PATCH 3/3] e2fsprogs: add a function computing old desc blocks without reserved ones Yongqiang Yang
2012-01-23 16:45 ` Ted Ts'o [this message]
2012-01-23 16:47 ` [PATCH V2 1/3] mke2fs: correct help text for option -G of mke2fs Ted Ts'o
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=20120123164527.GA4439@thunk.org \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=xiaoqiangnk@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).