LU-16974 utils: fix 'lfs mirror resync --stats' printing
If "lfs mirror resync --stats" is run without --bandwidth-limit,
then no stats are printed until the file resync is 100% finished.
Fix llapi_mirror_resync_many_params() to print the stats even if
no bandwidth throttle is being applied.
Fix write estimate calculation for a file with multiple components.
Print stats with requested granularity, not rounded to next second.
Update the code in lfs.c::migrate_copy_data() to use shared stats
printing and bandwidth throttling with llapi_mirror_resync_many().
Replace direct calls to fprintf() with llapi_err*().
Fix header ordering, remove duplicate headers found.
Test-Parameters: trivial testlist=sanity-flr
Fixes:
be131d125a ("LU-16974 utils: lfs mirror resync to show progress")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I68df25501f3cac2647318cff2eb86062f9300c1e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59263
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Alexandre Ioffe <aioffe@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>