[RH7,1/2] ploop: Pass correct argument in kaio_sync_read_many()

Submitted by Kirill Tkhai on Aug. 13, 2020, 5:41 p.m.


Message ID 159734046585.100367.15513406790086458982.stgit@localhost.localdomain
State New
Series "Series without cover letter"
Headers show

Commit Message

Kirill Tkhai Aug. 13, 2020, 5:41 p.m.
AIO argument has to be passed here, while READ_SYNC results
in permanent EINVAL.

The fix has no visible effect, as this function is currently
unused (kaio is not populating holes_bitmap on mount at the moment).


Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
 drivers/block/ploop/io_kaio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index 36f4a6291c59..87287afcd65f 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -886,7 +886,7 @@  kaio_sync_write(struct ploop_io * io, struct page * page, unsigned int len,
 static int kaio_sync_read_many(struct ploop_io *io, struct page *pages[],
 				unsigned int nr_pages, sector_t sec)
-	return kaio_sync_io(io, READ_SYNC, pages, nr_pages,
+	return kaio_sync_io(io, IOCB_CMD_READ_ITER, pages, nr_pages,
 			    PAGE_SIZE * nr_pages, 0, sec);