At specified time intervals lhsmtool_posix reports how much data it's
written. It should report how much data has been written since last
update, but it reports total data written.
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I0e85b81fa2a8cf16474cc832bca30bf1425fa81c
Reviewed-on: http://review.whamcloud.com/17878
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
if (now >= last_report_time + opt.o_report_int) {
last_report_time = now;
CT_TRACE("%%"LPU64" ", 100 * write_total / length);
- he.length = write_total;
+ /* only give the length of the write since the last
+ * progress report */
+ he.length = offset - he.offset;
rc = llapi_hsm_action_progress(hcp, &he, length, 0);
if (rc < 0) {
/* Action has been canceled or something wrong
" '%s'->'%s' failed", src, dst);
goto out;
}
+ he.offset = offset;
}
rc = 0;
}