aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBan Siesta <bansiesta@gmail.com>2015-01-04 18:59:53 +0000
committerBan Siesta <bansiesta@gmail.com>2015-01-04 18:59:53 +0000
commite8eff3061f5e9c451c94d081932cac0e62e1a9b9 (patch)
treee4ca3a194388ea596ff5808f799355c825e18d89 /src
parent1b7bdcb07a27c1710cf6e47168db3152a0d26143 (diff)
downloadpx4-firmware-e8eff3061f5e9c451c94d081932cac0e62e1a9b9.tar.gz
px4-firmware-e8eff3061f5e9c451c94d081932cac0e62e1a9b9.tar.bz2
px4-firmware-e8eff3061f5e9c451c94d081932cac0e62e1a9b9.zip
Revert "sdlog2: slow down the free space check a bit more"
This reverts commit 04c273bca6c99f31fd04741234d9c8efa849b553.
Diffstat (limited to 'src')
-rw-r--r--src/modules/sdlog2/sdlog2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c
index 9dd80a18e..1bf7d7198 100644
--- a/src/modules/sdlog2/sdlog2.c
+++ b/src/modules/sdlog2/sdlog2.c
@@ -600,19 +600,16 @@ static void *logwriter_thread(void *arg)
should_wait = true;
}
- /* slow down fsync */
- if (poll_count % 10 == 0) {
+ if (++poll_count == 10) {
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);