generic/192: fix instability on exFAT
authorPavel Reichl <preichl@redhat.com>
Tue, 27 Apr 2021 08:59:29 +0000 (10:59 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 9 May 2021 13:52:04 +0000 (21:52 +0800)
commit91c239fae9983d04cba4a3589eda4f474dce7f41
treec95aaf2d0fd85deed24a77ca2d03555822d64458
parentd599c768cb3379769f095d1434c04904c7d3ad22
generic/192: fix instability on exFAT

exFAT's access time has 2s granularity and is rounded down.

This can cause problems, e.g.:

if real access times are: time1=2 and time2=7, then 7 - 2 = 5;
but exfat_atime(7) - exfat_atime(2) => 6 - 2 = 4 which is less
than expected delay.

To fix this, even (delay - 1s) should be considered as a valid result
for exFAT.

Signed-off-by: Pavel Reichl <preichl@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/192