mirror of
https://github.com/schoebel/mars
synced 2025-02-26 17:40:43 +00:00
copy: add timestamp of last advance
This commit is contained in:
parent
024c02c532
commit
7697826b5d
@ -679,6 +679,7 @@ int _run_copy(struct copy_brick *brick)
|
|||||||
}
|
}
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
brick->copy_last += count;
|
brick->copy_last += count;
|
||||||
|
get_lamport(&brick->copy_last_stamp);
|
||||||
MARS_IO("new copy_last += %d => %lld\n", count, brick->copy_last);
|
MARS_IO("new copy_last += %d => %lld\n", count, brick->copy_last);
|
||||||
_update_percent(brick);
|
_update_percent(brick);
|
||||||
}
|
}
|
||||||
@ -797,6 +798,7 @@ static int copy_switch(struct copy_brick *brick)
|
|||||||
brick->is_aborting = false;
|
brick->is_aborting = false;
|
||||||
if (!brick->thread) {
|
if (!brick->thread) {
|
||||||
brick->copy_last = brick->copy_start;
|
brick->copy_last = brick->copy_start;
|
||||||
|
get_lamport(&brick->copy_last_stamp);
|
||||||
brick->thread = brick_thread_create(_copy_thread, brick, "mars_copy%d", version++);
|
brick->thread = brick_thread_create(_copy_thread, brick, "mars_copy%d", version++);
|
||||||
if (brick->thread) {
|
if (brick->thread) {
|
||||||
brick->trigger = true;
|
brick->trigger = true;
|
||||||
|
@ -60,6 +60,7 @@ struct copy_brick {
|
|||||||
bool abort_mode; // abort on IO error (default is retry forever)
|
bool abort_mode; // abort on IO error (default is retry forever)
|
||||||
// readonly from outside
|
// readonly from outside
|
||||||
loff_t copy_last; // current working position
|
loff_t copy_last; // current working position
|
||||||
|
struct timespec copy_last_stamp;
|
||||||
int copy_error;
|
int copy_error;
|
||||||
int copy_error_count;
|
int copy_error_count;
|
||||||
int verify_ok_count;
|
int verify_ok_count;
|
||||||
|
Loading…
Reference in New Issue
Block a user