Fix crash and precision of ETA with zones
authorJens Axboe <axboe@kernel.dk>
Thu, 7 Feb 2013 11:54:10 +0000 (12:54 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 Feb 2013 11:54:10 +0000 (12:54 +0100)
commit0d73a2f983c2ec7b4498d92ef1f0f79f2445a2f8
tree9a52bf603488de4a68f45ce002d0d9817f0455a2
parent10a6b3c67042914fe9d287027bf8792f69e84524
Fix crash and precision of ETA with zones

If zonesize was bigger than zoneskip, we could encounter a divide by
zero when calculating the number of bytes.

Additionally, the math was just wrong for most cases of zone settings.
Improve that.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
eta.c