From 731c154b197fa7064da7966a89eed7962dee3a67 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 29 Nov 2018 10:19:45 -0800 Subject: [PATCH] ircd::db: Disable AIO for fsync related for now. --- ircd/db.cc | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/ircd/db.cc b/ircd/db.cc index dcb208e0e..72d207f1b 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -4432,7 +4432,10 @@ noexcept try }; #endif - fs::fdsync(fd); + //TODO: AIO fdsync() throwing -EINVAL. + fs::fsync_opts opts; + opts.use_aio = false; + fs::fdsync(fd, opts); return Status::OK(); } catch(const fs::error &e) @@ -4478,7 +4481,10 @@ noexcept try }; #endif - fs::fdsync(fd); + //TODO: AIO fdsync() throwing -EINVAL. + fs::fsync_opts opts; + opts.use_aio = false; + fs::fdsync(fd, opts); return Status::OK(); } catch(const fs::error &e) @@ -4522,7 +4528,10 @@ noexcept try }; #endif - fs::fsync(fd); + //TODO: AIO fdsync() throwing -EINVAL. + fs::fsync_opts opts; + opts.use_aio = false; + fs::fsync(fd, opts); return Status::OK(); } catch(const fs::error &e) @@ -6595,7 +6604,10 @@ noexcept try }; #endif - fs::fsync(fd); + //TODO: AIO fdsync() throwing -EINVAL. + fs::fsync_opts opts; + opts.use_aio = false; + fs::fsync(fd, opts); return Status::OK(); } catch(const fs::error &e) @@ -6641,7 +6653,10 @@ noexcept try }; #endif - fs::fdsync(fd); + //TODO: AIO fdsync() throwing -EINVAL. + fs::fsync_opts opts; + opts.use_aio = false; + fs::fdsync(fd, opts); return Status::OK(); } catch(const fs::error &e) @@ -6687,7 +6702,10 @@ noexcept try }; #endif - fs::fdsync(fd); + //TODO: AIO fdsync() throwing -EINVAL. + fs::fsync_opts opts; + opts.use_aio = false; + fs::fdsync(fd, opts); return Status::OK(); } catch(const fs::error &e)