Re: [Qemu-devel] [PATCH v2 03/23] block: Connect BlockBackend to BlockDriverState

2014-09-15 Thread Markus Armbruster
Benoît Canet writes: >> index ff95da6..fa8a7d0 100644 >> --- a/qemu-nbd.c >> +++ b/qemu-nbd.c >> @@ -689,7 +689,7 @@ int main(int argc, char **argv) >> } >> > >> blk = blk_new("hda", &error_abort); > Is a blk_new_with_bs converssion missing here ? Yes. Max spotted it, too :) >> -

Re: [Qemu-devel] [PATCH v2 03/23] block: Connect BlockBackend to BlockDriverState

2014-09-15 Thread Benoît Canet
> index ff95da6..fa8a7d0 100644 > --- a/qemu-nbd.c > +++ b/qemu-nbd.c > @@ -689,7 +689,7 @@ int main(int argc, char **argv) > } > > blk = blk_new("hda", &error_abort); Is a blk_new_with_bs converssion missing here ? > -bs = bdrv_new_root("hda", &error_abort); > +bs = blk_bs(bl

Re: [Qemu-devel] [PATCH v2 03/23] block: Connect BlockBackend to BlockDriverState

2014-09-15 Thread Markus Armbruster
Max Reitz writes: > On 13.09.2014 17:00, Markus Armbruster wrote: >> The pointer from BlockBackend to BlockDriverState is a strong >> reference, managed with bdrv_ref() / bdrv_unref(), the back-pointer is >> a weak one. >> >> Convenience function blk_new_with_bs() creates a BlockBackend with its

Re: [Qemu-devel] [PATCH v2 03/23] block: Connect BlockBackend to BlockDriverState

2014-09-13 Thread Max Reitz
On 13.09.2014 17:00, Markus Armbruster wrote: The pointer from BlockBackend to BlockDriverState is a strong reference, managed with bdrv_ref() / bdrv_unref(), the back-pointer is a weak one. Convenience function blk_new_with_bs() creates a BlockBackend with its BlockDriverState. Callers have to

[Qemu-devel] [PATCH v2 03/23] block: Connect BlockBackend to BlockDriverState

2014-09-13 Thread Markus Armbruster
The pointer from BlockBackend to BlockDriverState is a strong reference, managed with bdrv_ref() / bdrv_unref(), the back-pointer is a weak one. Convenience function blk_new_with_bs() creates a BlockBackend with its BlockDriverState. Callers have to unref both. The commit after next will relieve