Skip to content
Snippets Groups Projects
Commit 04c273bc authored by Ban Siesta's avatar Ban Siesta
Browse files

sdlog2: slow down the free space check a bit more

parent 3b418a5a
No related branches found
No related tags found
No related merge requests found
......@@ -594,16 +594,19 @@ static void *logwriter_thread(void *arg)
should_wait = true;
}
if (++poll_count == 10) {
/* slow down fsync */
if (poll_count % 10 == 0) {
fsync(log_fd);
poll_count = 0;
/* slow down the check even more, and don't do both at the same time */
} else if (poll_count % 1000 == 5) {
/* check if space is available, if not stop everything */
if (check_free_space() != OK) {
logwriter_should_exit = true;
main_thread_should_exit = true;
}
}
poll_count++;
}
fsync(log_fd);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment