From: Matt Benjamin Date: Tue, 24 Nov 2020 13:24:53 +0000 (-0500) Subject: rgwfio: use xfer_buflen and xfer_buf, fix read offset X-Git-Tag: v16.1.0~81^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ca207e5a2ac115ac7c5fb1b9924e58a537146989;p=ceph.git rgwfio: use xfer_buflen and xfer_buf, fix read offset For consistency, use xfer_buf and xfer_buflen members of the fio io description, in preference to buflen and buf. Also, allow fio to read at any offset, unless overriden (as this might conflict with fio verify ops). Signed-off-by: Matt Benjamin --- diff --git a/src/test/fio/fio_librgw.cc b/src/test/fio/fio_librgw.cc index 6b923619e31..14418f433c8 100644 --- a/src/test/fio/fio_librgw.cc +++ b/src/test/fio/fio_librgw.cc @@ -392,8 +392,10 @@ namespace { goto out; } - r = rgw_write(data->fs, object_fh, 0, io_u->buflen, &nbytes, - (void*) io_u->buf, RGW_WRITE_FLAG_NONE); + /* librgw can write at any offset, but only sequentially + * starting at 0, in one open/write/close cycle */ + r = rgw_write(data->fs, object_fh, 0, io_u->xfer_buflen, &nbytes, + (void*) io_u->xfer_buf, RGW_WRITE_FLAG_NONE); if (!! r) { dprint(FD_IO, "rgw_write failed for %s\n", object); @@ -421,8 +423,8 @@ namespace { goto out; } - r = rgw_read(data->fs, object_fh, 0, io_u->buflen, &nbytes, io_u->buf, - RGW_READ_FLAG_NONE); + r = rgw_read(data->fs, object_fh, io_u->offset, io_u->xfer_buflen, + &nbytes, io_u->xfer_buf, RGW_READ_FLAG_NONE); if (!! r) { dprint(FD_IO, "rgw_read failed for %s\n", object);