On Wed, 12 Mar 2014, Andreas Färber wrote:
It may not be sensible for normal use cases, but it allows to use /dev/null in QTest.
Thanks! Sounds useful despite not being usable as storage. :) I applied to my nvme tree here: http://git.infradead.org/users/kbusch/qemu-nvme.git It's quite a bit ahead of the upstream on 'nvme features'. I often hear from people in various orgs using this, so might be time I roll it into a pull request.
Signed-off-by: Andreas Färber <afaer...@suse.de> --- hw/block/nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 2882ffe..5fd8f89 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -752,8 +752,8 @@ static int nvme_init(PCIDevice *pci_dev) return -1; } - bs_size = bdrv_getlength(n->conf.bs); - if (bs_size <= 0) { + bs_size = bdrv_getlength(n->conf.bs); + if (bs_size < 0) { return -1; } -- 1.8.4.5