Re: Reference-counting and finalizers that can fail are uneasy partners (was: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image)

2023-02-22 Thread Daniel P . Berrangé
On Wed, Feb 22, 2023 at 01:08:05PM +0100, Markus Armbruster wrote: > A half-baked thought has been sloshing around in my head. Perhaps I can > bake it some more by writing it up. > > Reference-counting and finalizers that can fail are uneasy partners. > > When managing lifetimes manually, you co

Reference-counting and finalizers that can fail are uneasy partners (was: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image)

2023-02-22 Thread Markus Armbruster
A half-baked thought has been sloshing around in my head. Perhaps I can bake it some more by writing it up. Reference-counting and finalizers that can fail are uneasy partners. When managing lifetimes manually, you control where finalization happens. When finalization can fail, you're as empowe

Re: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image

2023-02-15 Thread Vladimir Sementsov-Ogievskiy
On 15.02.23 16:07, Markus Armbruster wrote: Kevin Wolf writes: Am 13.01.2023 um 08:30 hat Markus Armbruster geschrieben: Drive-by comment... Kevin Wolf writes: This series addresses the problem described in these bug reports: https://gitlab.com/qemu-project/qemu/-/issues/1330 https://bugz

Re: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image

2023-02-15 Thread Markus Armbruster
Kevin Wolf writes: > Am 13.01.2023 um 08:30 hat Markus Armbruster geschrieben: >> Drive-by comment... >> >> Kevin Wolf writes: >> >> > This series addresses the problem described in these bug reports: >> > https://gitlab.com/qemu-project/qemu/-/issues/1330 >> > https://bugzilla.redhat.com/show

Re: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image

2023-02-14 Thread Vladimir Sementsov-Ogievskiy
On 13.01.23 14:29, Kevin Wolf wrote: Another thing that could be tried is making failure in .bdrv_close less likely by doing things earlier. At least ENOSPC could probably be avoided if dirty bitmaps clusters were allocated during the write request that first sets a bit in them (I know too little

Re: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image

2023-01-17 Thread Hanna Czenczek
On 12.01.23 20:14, Kevin Wolf wrote: This series addresses the problem described in these bug reports: https://gitlab.com/qemu-project/qemu/-/issues/1330 https://bugzilla.redhat.com/show_bug.cgi?id=2147617 qcow2 can fail when writing back dirty bitmaps in qcow2_inactivate(). However, when the fu

Re: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image

2023-01-13 Thread Kevin Wolf
Am 13.01.2023 um 08:30 hat Markus Armbruster geschrieben: > Drive-by comment... > > Kevin Wolf writes: > > > This series addresses the problem described in these bug reports: > > https://gitlab.com/qemu-project/qemu/-/issues/1330 > > https://bugzilla.redhat.com/show_bug.cgi?id=2147617 > > > > qc

Re: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image

2023-01-12 Thread Markus Armbruster
Drive-by comment... Kevin Wolf writes: > This series addresses the problem described in these bug reports: > https://gitlab.com/qemu-project/qemu/-/issues/1330 > https://bugzilla.redhat.com/show_bug.cgi?id=2147617 > > qcow2 can fail when writing back dirty bitmaps in qcow2_inactivate(). > Howeve

[PATCH 0/4] qemu-img: Fix exit code for errors closing the image

2023-01-12 Thread Kevin Wolf
This series addresses the problem described in these bug reports: https://gitlab.com/qemu-project/qemu/-/issues/1330 https://bugzilla.redhat.com/show_bug.cgi?id=2147617 qcow2 can fail when writing back dirty bitmaps in qcow2_inactivate(). However, when the function is called through blk_unref(), i