diff --git a/include/ircd/fs/iov.h b/include/ircd/fs/iov.h index 65c4471ac..3713258bf 100644 --- a/include/ircd/fs/iov.h +++ b/include/ircd/fs/iov.h @@ -31,12 +31,4 @@ namespace ircd::fs // useful for progressive readv()'s filling the buffers. const_iovec_view make_iov(const iovec_view &, const const_buffers &, const size_t &off = 0); const_iovec_view make_iov(const iovec_view &, const mutable_buffers &, const size_t &off = 0); - - // Transforms our buffers to struct iovec ones. This is done using an - // internal thread_local array of IOV_MAX. The returned view is of that - // array. We get away with using a single buffer because the synchronous - // readv()/writev() calls block the thread and for AIO the iov is copied out - // of userspace on io_submit(). - const_iovec_view make_iov(const const_buffers &, const size_t &off = 0); - const_iovec_view make_iov(const mutable_buffers &, const size_t &off = 0); } diff --git a/ircd/fs.cc b/ircd/fs.cc index ed6683bcf..89123ca6c 100644 --- a/ircd/fs.cc +++ b/ircd/fs.cc @@ -1245,43 +1245,6 @@ noexcept(false) // fs/iov.h // -namespace ircd::fs -{ - thread_local std::array _iov_; -} - -ircd::fs::const_iovec_view -ircd::fs::make_iov(const mutable_buffers &bufs, - const size_t &offset) -{ - if(unlikely(bufs.size() > _iov_.size())) - throw error - { - make_error_code(std::errc::invalid_argument), - "Buffer count of %zu exceeds IOV_MAX of %zu", - bufs.size(), - _iov_.size() - }; - - return make_iov(iovec_view(_iov_.data(), _iov_.size()), bufs, offset); -} - -ircd::fs::const_iovec_view -ircd::fs::make_iov(const const_buffers &bufs, - const size_t &offset) -{ - if(unlikely(bufs.size() > _iov_.size())) - throw error - { - make_error_code(std::errc::invalid_argument), - "Buffer count of %zu exceeds IOV_MAX of %zu", - bufs.size(), - _iov_.size() - }; - - return make_iov(iovec_view(_iov_.data(), _iov_.size()), bufs, offset); -} - ircd::fs::const_iovec_view ircd::fs::make_iov(const iovec_view &iov, const mutable_buffers &bufs,