Menu

#41 should check i_translator for Hurd volumes

open
nobody
None
5
2012-11-28
2010-02-13
No

In OS = hurd volumes, the i_translator field is the number of the block
containing the translator path and args. The other day, I had a damaged
filesystem where it was a random value, which was making hurd's ext2fs
complain, but e2fsck wasn't fixing it. ext2fs_block_iterate3() does see
it, but I don't see code that checks that it is a valid block count. I
guess something like the following could be added to the inode pass?

if ((fs->super->s_creator_os == EXT2_OS_HURD)) {
block = (inode.osd1.hurd1.h_i_translator)
if (block) {
if (!check_block_valid(block)) {
printf(_("Invalid translator block number for inode %d, clearing"), inode);
inode.osd1.hurd1.h_i_translator = 0;
}
}
}

I guess in case the i_translator field points to the same block as
something else in the filesystem, duplicating the block as is done for
other cases is the best e2fsck can do.

Discussion