diff --git a/ircd/fs.cc b/ircd/fs.cc index 4c3e7f323..17442c434 100644 --- a/ircd/fs.cc +++ b/ircd/fs.cc @@ -653,10 +653,10 @@ ircd::fs::flush(const fd &fd, if(aio::system && opts.aio) { if(support::aio_fdsync && !opts.metadata) - return aio::fsync(fd, opts); + aio::fsync(fd, opts); if(support::aio_fsync && opts.metadata) - return aio::fsync(fd, opts); + aio::fsync(fd, opts); } #endif diff --git a/ircd/fs_aio.cc b/ircd/fs_aio.cc index 4b2ec722b..4798659ee 100644 --- a/ircd/fs_aio.cc +++ b/ircd/fs_aio.cc @@ -149,7 +149,10 @@ ircd::fs::aio::translate(const int &val) ircd::fs::aio::request::fsync::fsync(const int &fd, const sync_opts &opts) -:request{fd, &opts} +:request +{ + fd, &opts +} { assert(opts.op == op::SYNC); aio_lio_opcode = opts.metadata? IOCB_CMD_FSYNC : IOCB_CMD_FDSYNC; @@ -159,7 +162,7 @@ ircd::fs::aio::request::fsync::fsync(const int &fd, aio_offset = 0; } -void +size_t ircd::fs::aio::fsync(const fd &fd, const sync_opts &opts) { @@ -168,7 +171,12 @@ ircd::fs::aio::fsync(const fd &fd, fd, opts }; - request(); + const size_t bytes + { + request() + }; + + return bytes; } // @@ -176,9 +184,12 @@ ircd::fs::aio::fsync(const fd &fd, // ircd::fs::aio::request::read::read(const int &fd, - const const_iovec_view &iov, - const read_opts &opts) -:request{fd, &opts} + const read_opts &opts, + const const_iovec_view &iov) +:request +{ + fd, &opts +} { assert(opts.op == op::READ); aio_lio_opcode = IOCB_CMD_PREADV; @@ -195,13 +206,13 @@ ircd::fs::aio::read(const fd &fd, { aio::request::read request { - fd, bufs, opts + fd, opts, bufs }; const scope_count cur_reads{stats.cur_reads}; stats.max_reads = std::max(stats.max_reads, stats.cur_reads); - size_t bytes + const size_t bytes { request() }; @@ -216,9 +227,12 @@ ircd::fs::aio::read(const fd &fd, // ircd::fs::aio::request::write::write(const int &fd, - const const_iovec_view &iov, - const write_opts &opts) -:request{fd, &opts} + const write_opts &opts, + const const_iovec_view &iov) +:request +{ + fd, &opts +} { assert(opts.op == op::WRITE); aio_lio_opcode = IOCB_CMD_PWRITEV; @@ -259,7 +273,7 @@ ircd::fs::aio::write(const fd &fd, { aio::request::write request { - fd, bufs, opts + fd, opts, bufs }; const size_t req_bytes diff --git a/ircd/fs_aio.h b/ircd/fs_aio.h index ce77a1b3c..ba43d06d0 100644 --- a/ircd/fs_aio.h +++ b/ircd/fs_aio.h @@ -144,14 +144,14 @@ struct ircd::fs::aio::request struct ircd::fs::aio::request::read :request { - read(const int &fd, const const_iovec_view &, const read_opts &); + read(const int &fd, const read_opts &, const const_iovec_view &); }; /// Write request control block struct ircd::fs::aio::request::write :request { - write(const int &fd, const const_iovec_view &, const write_opts &); + write(const int &fd, const write_opts &, const const_iovec_view &); }; /// fsync request control block