Message ID | 1394648907-20096-13-git-send-email-afaerber@suse.de |
---|---|
State | New |
Headers | show |
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 <afaerber@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 > >
Am 12.03.2014 20:13, schrieb Keith Busch: > 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. :) Thanks for the quick review! > 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. Tonight is Hard Freeze for 2.0. If you could also review the matching test case http://patchwork.ozlabs.org/patch/329627/ I would put both in my pull. I guess you'll need to submit your queue for review first? Hard to see in a non-rebased tree. Thanks, Andreas
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; }
It may not be sensible for normal use cases, but it allows to use /dev/null in QTest. Signed-off-by: Andreas Färber <afaerber@suse.de> --- hw/block/nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)