New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/fs/aio: use small_vector for aio_t; clean up header location #14853

Merged
merged 4 commits into from May 2, 2017

Conversation

Projects
None yet
2 participants
@liewegas
Member

liewegas commented Apr 27, 2017

No description provided.

liewegas added some commits Apr 27, 2017

buffer: templatize prepare_iov
Allow this to work on std::vector types.

Signed-off-by: Sage Weil <sage@redhat.com>
os/fs: use small_vector for aio_t::iov (instead of std::vector)
These are usually small per io.  Avoid an additional allocation.

Signed-off-by: Sage Weil <sage@redhat.com>
common/aio: move aio out of its wierd home in os/fs/FS.h
This never made sense.  Move it.  Fix users.

Signed-off-by: Sage Weil <sage@redhat.com>
Show outdated Hide outdated src/include/buffer.h
assert(_buffers.size() <= IOV_MAX);
piov->resize(_buffers.size());
unsigned n = 0;
for (std::list<buffer::ptr>::const_iterator p = _buffers.begin();

This comment has been minimized.

@tchaikov

tchaikov Apr 28, 2017

Contributor

could use auto and range-based loop here.

@tchaikov

tchaikov Apr 28, 2017

Contributor

could use auto and range-based loop here.

Show outdated Hide outdated src/include/buffer.h
p != _buffers.end();
++p, ++n) {
(*piov)[n].iov_base = (void *)p->c_str();
(*piov)[n].iov_len = p->length();

This comment has been minimized.

@tchaikov

tchaikov Apr 28, 2017

Contributor

and do n++ here if use range-based loop.

@tchaikov

tchaikov Apr 28, 2017

Contributor

and do n++ here if use range-based loop.

include/buffer: use range-based loop
Signed-off-by: Sage Weil <sage@redhat.com>

@tchaikov tchaikov self-requested a review Apr 29, 2017

@tchaikov tchaikov merged commit 4121a3f into ceph:master May 2, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment