]> git.proxmox.com Git - mirror_qemu.git/commit - block/linux-aio.c
linux-aio: add `dev_max_batch` parameter to laio_co_submit()
authorStefano Garzarella <sgarzare@redhat.com>
Tue, 26 Oct 2021 16:23:45 +0000 (18:23 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 2 Nov 2021 12:03:35 +0000 (13:03 +0100)
commit512da211010700cdbfaab45c8980ca88958a4ab8
tree8054868338e2b4c4f12e58e010e60a059ba91f1c
parent684960d46267d6e6443b39ee98b3a95632ba8dc6
linux-aio: add `dev_max_batch` parameter to laio_co_submit()

This new parameter can be used by block devices to limit the
Linux AIO batch size more than the limit set by the AIO context.

file-posix backend supports this, passing its `aio-max-batch` option
previously added.

Add an helper function to calculate the maximum batch size.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20211026162346.253081-3-sgarzare@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/file-posix.c
block/linux-aio.c
include/block/raw-aio.h