block/nvme: Replace qemu_try_blockalign(bs) by qemu_try_memalign(pg_sz)
commit38e1f8186fc40054ae12b9b5e21f051c2f59cb9c
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 21 Aug 2020 19:53:54 +0000 (21 21:53 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 7 Sep 2020 10:31:30 +0000 (7 12:31 +0200)
tree49e7a9f9150ef7cb0663b4b9f391ee0458c9d663
parent2ed846930df76bb5c708cbbfbae714607c4d7e12
block/nvme: Replace qemu_try_blockalign(bs) by qemu_try_memalign(pg_sz)

qemu_try_blockalign() is a generic API that call back to the
block driver to return its page alignment. As we call from
within the very same driver, we already know to page alignment
stored in our state. Remove indirections and use the value from
BDRVNVMeState.
This change is required to later remove the BlockDriverState
argument, to make nvme_init_queue() per hardware, and not per
block driver.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200821195359.1285345-11-philmd@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/nvme.c