We have two sets of interfaces, in StorageEngineMetadata and storage_file_util.h under db/storage for fsyncing files and directories that are also used outside storage execution internals (See SERVER-39944 and SERVER-57834).
It would be nice to look into unifying these fsync wrappers functions.
The storage.bson file may become empty after startup
Repair should move aside unsalvageable data files and create empty ones in their place
Add keystore metadata implementation for ESE
Handle recovery at startup based on FileBasedInitialSyncer marker files