util/fossilize_db: Flush files after header write.

We should probably flush before we unlock the file again.

Fixes: 4f0f8133a3 "util/fossilize_db: Do not lock the fossilize db permanently."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204>
This commit is contained in:
Bas Nieuwenhuizen 2021-08-05 01:29:04 +02:00 committed by Marge Bot
parent 57ca07455c
commit 3091277052

View file

@ -241,6 +241,9 @@ load_foz_dbs(struct foz_db *foz_db, FILE *db_idx, uint8_t file_idx,
sizeof(stream_reference_magic_and_version), db_idx) !=
sizeof(stream_reference_magic_and_version))
goto fail;
fflush(foz_db->file[file_idx]);
fflush(db_idx);
}
flock(fileno(foz_db->file[file_idx]), LOCK_UN);