mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 14:20:05 -05:00
Scrub first the just synced blocks
This commit is contained in:
parent
9a5f30cd32
commit
cca2cbb23f
9 changed files with 74 additions and 49 deletions
|
|
@ -975,6 +975,19 @@ static inline int info_get_justsynced(snapraid_info info)
|
|||
return (info & 0x4) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the latest scrub time.
|
||||
*
|
||||
* If the block was not scrubbed, 0 is returned.
|
||||
*/
|
||||
static inline time_t info_get_scrubtime(snapraid_info info)
|
||||
{
|
||||
if (info_get_justsynced(info))
|
||||
return 0;
|
||||
else
|
||||
return info_get_time(info);
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the block address as with error.
|
||||
*/
|
||||
|
|
@ -1019,9 +1032,9 @@ static inline snapraid_info info_get(tommy_arrayblkof* array, unsigned pos)
|
|||
}
|
||||
|
||||
/**
|
||||
* Compares info by time.
|
||||
* Compare times
|
||||
*/
|
||||
int info_time_compare(const void* void_a, const void* void_b);
|
||||
int time_compare(const void* void_a, const void* void_b);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue