Add fsyncs to vitastor-disk prepare (cosmetic)

This commit is contained in:
Vitaliy Filippov
2026-05-30 16:16:31 +03:00
parent 126891126a
commit 155cfb3c73
+3 -2
View File
@@ -138,6 +138,7 @@ uint32_t disk_tool_t::write_osd_superblock(std::string device, json11::Json para
free(buf);
return 0;
}
fsync(fd);
close(fd);
free(buf);
if (!test_mode)
@@ -419,9 +420,9 @@ int disk_tool_t::clear_osd_superblock(const std::string & dev)
r = 0;
}
}
}
if (fd >= 0)
fsync(fd);
close(fd);
}
free(buf);
buf = NULL;
return r;