OSDN Git Service

e4defrag: fix file blocks calculation
authorKazuya Mio <k-mio@sx.jp.nec.com>
Mon, 13 Dec 2010 14:59:06 +0000 (09:59 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 13 Dec 2010 14:59:06 +0000 (09:59 -0500)
commit02808f7d9aabc7df6121d767fcebfb6e8aa32b56
tree8f8243f45280135d140866c862ec2e64f0369058
parent94d26c267d30a8548e2a46e6fe9eaacdb6998596
e4defrag: fix file blocks calculation

e4defrag uses st_blocks (struct stat) to calculate file blocks. However,
st_blocks also has meta data blocks in addition to file blocks. So, we
calculate file blocks by sum of the extent length.

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