mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-22 07:56:33 -05:00
Keeps track of the last sync time of each block.
This commit is contained in:
parent
ef53cd4086
commit
e0164b29d1
3 changed files with 39 additions and 10 deletions
7
sync.c
7
sync.c
|
|
@ -45,6 +45,10 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
block_off_t autosavemissing;
|
||||
int ret;
|
||||
unsigned unrecoverable_error;
|
||||
time_t now;
|
||||
|
||||
/* get the present time */
|
||||
now = time(0);
|
||||
|
||||
/* maps the disks to handles */
|
||||
handle = handle_map(state, &diskmax);
|
||||
|
|
@ -309,6 +313,9 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
/* now all the blocks have the hash and the parity computed */
|
||||
block_state_set(block, BLOCK_STATE_BLK);
|
||||
}
|
||||
|
||||
/* update the time info of the block */
|
||||
info_set(&state->infoarr, i, info_make(now));
|
||||
}
|
||||
|
||||
/* mark the state as needing write */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue