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); free(buf);
return 0; return 0;
} }
fsync(fd);
close(fd); close(fd);
free(buf); free(buf);
if (!test_mode) if (!test_mode)
@@ -419,9 +420,9 @@ int disk_tool_t::clear_osd_superblock(const std::string & dev)
r = 0; r = 0;
} }
} }
} fsync(fd);
if (fd >= 0)
close(fd); close(fd);
}
free(buf); free(buf);
buf = NULL; buf = NULL;
return r; return r;