Before spinning down flush all the disk caches

This commit is contained in:
Andrea Mazzoleni 2025-09-27 19:40:32 +02:00
parent 906d215bf5
commit 47c0f3b8ae

View file

@ -1548,6 +1548,11 @@ int devquery(tommy_list* high, tommy_list* low, int operation, int others)
{
void* (*func)(void* arg) = 0;
if (operation == DEVICE_DOWN) {
/* flush all the disk caches before spinning down */
sync();
}
#if HAVE_LINUX_DEVICE
tommy_node* i;
struct stat st;