fio/coio: handle partial writes
Writing less bytes than requested is perfectly fine. In turn out
that fio.write/pwrite api simply returns 'true' even if only some
part of a buffer has been written.
Thus make coio_write and coio_pwrite to write the whole data in
a cycle. Note in most situations there will be only one pass,
partial writes are really the rare cases.
Note that we're not handling nonblocking writes here (which
could return EAGAIN) simply because we need an other api
which would accept timeouts.
Fixes #4651
Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com>
Showing
- src/lib/core/coio_file.c 51 additions, 11 deletionssrc/lib/core/coio_file.c
- src/lib/core/errinj.h 1 addition, 0 deletionssrc/lib/core/errinj.h
- test/app/fio.result 75 additions, 0 deletionstest/app/fio.result
- test/app/fio.test.lua 23 additions, 0 deletionstest/app/fio.test.lua
- test/box/errinj.result 1 addition, 0 deletionstest/box/errinj.result
Loading
Please register or sign in to comment