Whamcloud - gitweb
e4defrag: Use libext2fs to get the correct superblock information
authorKazuya Mio <k-mio@sx.jp.nec.com>
Sun, 19 Dec 2010 22:01:24 +0000 (22:01 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 24 Dec 2010 21:56:24 +0000 (16:56 -0500)
commit9ac557a1df6905b9861f90d2738e61b25580b002
tree2266815890a85a18e7a59f34de39f2a756872357
parent8d9c50c5570c2c87a99fb68389cebdc782433f82
e4defrag: Use libext2fs to get the correct superblock information

Currently, e4defrag always does byte-swapping when it gets superblock
information, so the calculation of the best extents count is not
correct on little endian machine. This doesn't cause data corruption,
but it may confuse users by showing the wrong extent count.  To solve
this problem, we use ext2fs_open() instead of get_superblock_info()
that is the original function.

Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/e4defrag.c