All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] qcow2: Fix alloc_cluster_abort() for pre-existing clusters
@ 2020-02-25 14:31 Max Reitz
  2020-02-25 14:31 ` [PATCH 1/3] " Max Reitz
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Max Reitz @ 2020-02-25 14:31 UTC (permalink / raw)
  To: qemu-block; +Cc: Kevin Wolf, qemu-stable, qemu-devel, Max Reitz

Hi,

With c3b6658c1a5a3fb2, Kevin has fixed a case in alloc_cluster_abort()
where we used to free a cluster that wasn’t even allocated by
handle_alloc(), thus leading to an error and/or corruption.  Besides
external data files, there is another case where alloc_cluster_abort()
must not free the “new” cluster: Namely when the cluster isn’t new
because we’re reusing an existing pre-allocated zero cluster.

I think Berto’s subcluster series fixes this, too, but it’s still an
RFC, so I suppose we have to fix the bug independently of it.

Patch 2 adds a regression test; patch 3 adds a regression test for
Kevin’s patch c3b6658c1a5a3fb2 (which didn’t come with one).


Max Reitz (3):
  qcow2: Fix alloc_cluster_abort() for pre-existing clusters
  iotests/026: Test EIO on preallocated zero cluster
  iotests/026: Test EIO on allocation in a data-file

 block/qcow2-cluster.c              |  2 +-
 tests/qemu-iotests/026             | 53 ++++++++++++++++++++++++++++++
 tests/qemu-iotests/026.out         | 16 +++++++++
 tests/qemu-iotests/026.out.nocache | 16 +++++++++
 4 files changed, 86 insertions(+), 1 deletion(-)

-- 
2.24.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-26 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-25 14:31 [PATCH 0/3] qcow2: Fix alloc_cluster_abort() for pre-existing clusters Max Reitz
2020-02-25 14:31 ` [PATCH 1/3] " Max Reitz
2020-02-25 14:31 ` [PATCH 2/3] iotests/026: Test EIO on preallocated zero cluster Max Reitz
2020-02-25 14:31 ` [PATCH 3/3] iotests/026: Test EIO on allocation in a data-file Max Reitz
2020-02-26 13:53 ` [PATCH 0/3] qcow2: Fix alloc_cluster_abort() for pre-existing clusters Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.