Fix future scrub times

This commit is contained in:
Andrea Mazzoleni 2018-09-25 22:02:14 +02:00
parent 473819467f
commit 294a0ae90d
2 changed files with 8 additions and 2 deletions

View file

@ -1,13 +1,14 @@
SnapRAID HISTORY
================
11.3 2018/06 (WIP)
11.3 2018/09 (WIP)
==================
* Fixed handing of Linux devices that have multiple slaves. This affects
the smart/list/devices/down commands [Valentin Hilbig].
* The 'list' command in verbose mode prints the full nanosecond
timestamp precision.
* After writing content files also sync their directory.
* Fix a invalid time computation that could result in future scrub times.
11.2 2017/12
============

View file

@ -3278,7 +3278,12 @@ static void* state_write_thread(void* arg)
flag |= 8;
sputb32(flag, f);
t = info_get_time(info) - info_oldest;
/* the oldest info is computed only on required blocks, so it may not be the absolute oldest */
if (info_get_time(info) >= info_oldest)
t = info_get_time(info) - info_oldest;
else
t = 0;
sputb32(t, f);
} else {
/* write a special 0 flag to mark missing info */