]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e4defrag: adjust total count when files change during the run
authorTheodore Ts'o <tytso@mit.edu>
Fri, 4 Jan 2019 04:06:42 +0000 (23:06 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 4 Jan 2019 04:06:42 +0000 (23:06 -0500)
commitc3749cad154ace57ef3c23a950fbaf44c7ad8a3b
tree485ab8b106eff9069306235dc076e2e455a6c9be
parent9fac506ef7582d246998fdbfc3291dccb6f82e75
e4defrag: adjust total count when files change during the run

If files are created while e4defrag is running, it's quite possible
for succeed_cnt to be larger than total_count, in which case the
number of failures (calculated via total_count - succeed_cnt) will
overflow and become a very large unsigned number.

The way we calculate statistics is a bit silly, since when recurse
into directories is counted, it's counted as a "failure".  But we'll
ignore this from now, and avoid the unsigned overflow.

Address-Debian-Bug: #888899

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/e4defrag.c