]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa_sim_blk: make vdpasim_blk_check_range usable by other requests
authorStefano Garzarella <sgarzare@redhat.com>
Thu, 11 Aug 2022 08:36:30 +0000 (10:36 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 11 Aug 2022 08:44:57 +0000 (04:44 -0400)
commitd9110919018a0f70a1cabceb4aba3c61c9c3141a
treeff2837dd88ebde09158b37a7b6b56c72529a2c9e
parent5319503cf67a5bbb2753dd1770d0755e204d40ae
vdpa_sim_blk: make vdpasim_blk_check_range usable by other requests

Next patches will add handling of other requests, where will be
useful to reuse vdpasim_blk_check_range().
So let's make it more generic by adding the `max_sectors` parameter,
since different requests allow different numbers of maximum sectors.

Let's also print the messages directly in vdpasim_blk_check_range()
to avoid duplicate prints.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20220811083632.77525-3-sgarzare@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c