Menu

#12 Inode extent checksum may prevent file restore

open
nobody
None
2022-08-09
2022-08-09
Max
No

I faced an issue when a file could not be restored in almost ideal condition: it was written among last files and no transactions has been added to ext4 journal after it removal. Due absence of error reporting it was not easy to figure out what has happened. The file is neither listed when -l option is used nor restored with -r.

The source of the problem is that ext2fs_extent_get returns EXT2_ET_EXTENT_CSUM_INVALID for 1/2 extent level.

As a hint what may help to overcome such problem, I have created a patch (on the top of patches from the Debian package). In my case it allows to correctly restore the file. However behavior should be controlled by a new command line option. As a more concise alternative I have considered opening filesystem with EXT2_FLAG_IGNORE_CSUM_ERRORS, but it would not allow to report checksum state for particular extents.

If someone is still interested in this project, I hope this bug will help to improve behavior of ext4magic.

1 Attachments

Discussion


Log in to post a comment.