mirror of
https://github.com/ceph/ceph
synced 2025-01-18 17:12:29 +00:00
common/buffer: off-by-one error in max iov length blocking
The loop in write_fd stops at IOV_MAX-1; it could go to IOV_MAX and write in more-natural sizes without extra tail writes. Fixes: http://tracker.ceph.com/issues/20907 Signed-off-by: Dan Mick <dan.mick@redhat.com>
This commit is contained in:
parent
d89af4a3e8
commit
89f85d22c1
@ -2382,7 +2382,7 @@ int buffer::list::write_fd(int fd) const
|
||||
}
|
||||
++p;
|
||||
|
||||
if (iovlen == IOV_MAX-1 ||
|
||||
if (iovlen == IOV_MAX ||
|
||||
p == _buffers.end()) {
|
||||
iovec *start = iov;
|
||||
int num = iovlen;
|
||||
|
Loading…
Reference in New Issue
Block a user