Add fsyncs to vitastor-disk prepare (cosmetic)
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user