Thread (6 messages) 6 messages, 2 authors, 2012-01-23

Re: [PATCH 3/3] e2fsprogs: add a function computing old desc blocks without reserved ones

From: Ted Ts'o <tytso@mit.edu>
Date: 2012-01-23 18:09:56

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help