]> git.proxmox.com Git - mirror_qemu.git/commit
nvme: Drop pointless .bdrv_co_get_block_status()
authorEric Blake <eblake@redhat.com>
Tue, 13 Feb 2018 20:26:42 +0000 (14:26 -0600)
committerKevin Wolf <kwolf@redhat.com>
Fri, 2 Mar 2018 17:39:07 +0000 (18:39 +0100)
commite3efee828bc76e9780143f246fb0399eedd80c5e
tree1d84f7f62f28881f1080551470541330efc2a817
parent86a3d5c6889594b814d47a80e366aa4831676199
nvme: Drop pointless .bdrv_co_get_block_status()

Commit bdd6a90 has a bug: drivers should never directly set
BDRV_BLOCK_ALLOCATED, but only io.c should do that (as needed).
Instead, drivers should report BDRV_BLOCK_DATA if it knows that
data comes from this BDS.

But let's look at the bigger picture: semantically, the nvme
driver is similar to the nbd, null, and raw drivers (no backing
file, all data comes from this BDS).  But while two of those
other drivers have to supply the callback (null because it can
special-case BDRV_BLOCK_ZERO, raw because it can special-case
a different offset), in this case the block layer defaults are
good enough without the callback at all (similar to nbd).

So, fix the bug by deletion ;)

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/nvme.c