mirror_zfs/cmd/zpool
Tom Caputi 85bdc68401 Fix estimated scrub completion time
Currently, it is possible for the 'zpool scrub' command to
progress slightly beyond 100% due to concurrent changes
happening on the live pool. This behavior is expected, but
the userspace code for 'zpool status' would subtract the
expected amount of data from the amount of data already
scrubbed, resulting in a negative integer being casted to a
large positive one. This number was then used to calculate
the estimated completion time, resulting in wildly wrong
results. This code changes the behavior so that 'zpool status'
does not attempt to report an estimate during this period.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8611 
Closes #8687
2019-05-01 17:34:24 -07:00
..
zpool.d shellcheck pass 2019-02-04 09:07:19 -08:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am Tunable directory for zfs runtime scripts 2018-06-07 09:59:59 -07:00
zpool_iter.c Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
zpool_main.c Fix estimated scrub completion time 2019-05-01 17:34:24 -07:00
zpool_util.c Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
zpool_util.h Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
zpool_vdev.c zpool: allow split with whole-disk devices 2018-11-20 10:22:53 -08:00