mbox series

[for-4.0,v2,0/3] freeze the backing chain earlier in stream_start()

Message ID cover.1553789986.git.berto@igalia.com (mailing list archive)
Headers show
Series freeze the backing chain earlier in stream_start() | expand

Message

Alberto Garcia March 28, 2019, 4:25 p.m. UTC
Hi,

this series fixes the bug that I found the other day and described here:

   https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00764.html
   https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00791.html

Patch 2 is the important one, patch 3 is a test case, and patch 1 will
allow us to detect this kind of errors earlier.

Regards,

Berto

v2:
- Patch 2: Change the rollback order [Vladimir]
- Patch 3: Use self.wait_until_completed() [Vladimir]

v1: https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00851.html
- Initial version

Output of backport-diff against v1:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/3:[----] [--] 'block: continue until base is found in bdrv_freeze_backing_chain() et al'
002/3:[----] [-C] 'block: freeze the backing chain earlier in stream_start()'
003/3:[0017] [FC] 'block: test block-stream with a base node that is used by block-commit'

Alberto Garcia (3):
  block: continue until base is found in bdrv_freeze_backing_chain() et
    al
  block: freeze the backing chain earlier in stream_start()
  block: test block-stream with a base node that is used by block-commit

 block.c                    | 21 ++++++++++++++-------
 block/stream.c             | 13 +++++++------
 tests/qemu-iotests/030     | 17 +++++++++++++++++
 tests/qemu-iotests/030.out |  4 ++--
 4 files changed, 40 insertions(+), 15 deletions(-)

Comments

Kevin Wolf March 29, 2019, 1:16 p.m. UTC | #1
Am 28.03.2019 um 17:25 hat Alberto Garcia geschrieben:
> Hi,
> 
> this series fixes the bug that I found the other day and described here:
> 
>    https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00764.html
>    https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00791.html
> 
> Patch 2 is the important one, patch 3 is a test case, and patch 1 will
> allow us to detect this kind of errors earlier.

The test doesn't seem to catch the bug for me.

Anyway, thanks, applied to the block branch.

Kevin
Alberto Garcia March 29, 2019, 2:16 p.m. UTC | #2
On Fri 29 Mar 2019 02:16:16 PM CET, Kevin Wolf wrote:
>> this series fixes the bug that I found the other day and described here:
>> 
>>    https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00764.html
>>    https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00791.html
>> 
>> Patch 2 is the important one, patch 3 is a test case, and patch 1 will
>> allow us to detect this kind of errors earlier.
>
> The test doesn't seem to catch the bug for me.

You have to run it several times in a loop, it doesn't happen always.

Berto
Kevin Wolf March 29, 2019, 4:33 p.m. UTC | #3
Am 29.03.2019 um 15:16 hat Alberto Garcia geschrieben:
> On Fri 29 Mar 2019 02:16:16 PM CET, Kevin Wolf wrote:
> >> this series fixes the bug that I found the other day and described here:
> >> 
> >>    https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00764.html
> >>    https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00791.html
> >> 
> >> Patch 2 is the important one, patch 3 is a test case, and patch 1 will
> >> allow us to detect this kind of errors earlier.
> >
> > The test doesn't seem to catch the bug for me.
> 
> You have to run it several times in a loop, it doesn't happen always.

Ah, yes. I could reproduce it after letting the test run in a loop.

Kevin