fix dblist size accounting (was Re: Invalid superblock after e2fsck)
A message that is not in the archive (sent off-list or not yet received): 1266753077.6554.24.camel@x61s
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 76957c4508f13d87ccfd919d88399180@localhost
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 1266945068.5772.19.camel@x61s
PATCH 1/1 fix dblist size accounting (was Re: Invalid superblock after e2fsck)
Quoted 9 lines · Albert Sellarès
I already tried to check the filesystem with last e2fsprogs version (1.41.10) but with this version I did get a segfault.
I opened a bug with all the information [1]
Thank you!
[1]
http://sourceforge.net/tracker/?func=detail&aid=2956459&group_id=2406&atid=102406
I'm not sure if it is related, but I noticed that the above bug is segfaulting in ext2fs_add_dir_block(), and I have a patch in my tree that fixes the block dblist accounting in the case that realloc() fails its allocation. I'm just in the process of sending out all of the patches I've accumulated, so I may as well send this one now.
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
Fix dblist size accounting in the case where ext2fs_resize_mem() fails to allocate a larger buffer.
lib/ext2fs/dblist.c +1 -1
@@ -169,7 +169,7 @@ errcode_t ext2fs_add_dir_block(ext2_dblisizeof (struct ext2_db_entry ), &dblist->list);if (retval) { - dblist->size -=100 ; + dblist->size = old_size /sizeof (struct ext2_db_entry );return retval; } }