]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit - lib/ext2fs/extent.c
libext2fs: refactor code which fixes up the checksums in an extent tree
authorTheodore Ts'o <tytso@mit.edu>
Sun, 21 Oct 2018 13:32:37 +0000 (09:32 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 21 Oct 2018 13:34:58 +0000 (09:34 -0400)
commitae9c0f3666de1aec5ebb2663346dcfc116f90f50
tree8d1641e5da6c0230ed91e8a86fa72f97ce3edc12
parent08699437143aad0fbae2d9ab18c5d6e67c4fa761
libext2fs: refactor code which fixes up the checksums in an extent tree

The code to recalculate the checksums in an extent tree (which is
needed after an inode is relocated so it has a different inode number)
was duplicated in tune2fs and resize2fs.  In addition, this work could
be done in a much more efficient way inside lib/ext2fs/extent.c.

This commit creates a new library function which corrects the
checksums in an inode's extent tree, named: ext2fs_fix_extents_checksums()

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext2fs.h
lib/ext2fs/extent.c
misc/tune2fs.c
resize/resize2fs.c