qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] qcow2: Undo leaked allocations in co_writev
@ 2013-10-11  7:36 Max Reitz
  2013-10-11  7:36 ` [Qemu-devel] [PATCH v2 1/2] " Max Reitz
  2013-10-11  7:36 ` [Qemu-devel] [PATCH v2 2/2] qemu-iotests: Extend test 026 Max Reitz
  0 siblings, 2 replies; 3+ messages in thread
From: Max Reitz @ 2013-10-11  7:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi, Max Reitz

If a write request on a qcow2 image spans more than one L2 table,
qcow2_alloc_cluster_offset cannot allocate the required clusters in a
single operation. This results in leaks, if a subsequent (atomic)
allocation in that function fails, because qcow2_co_writev does not undo
unused cluster allocations.

This series implements that deallocation and provides a test for it.

v2:
 - patch 1: added a comment about the significance of future changes at
   a certain point in qcow2_co_writev
 - patch 1: changed QCOW2_DISCARD_ALWAYS to QCOW2_DISCARD_OTHER

Max Reitz (2):
  qcow2: Undo leaked allocations in co_writev
  qemu-iotests: Extend test 026

 block/qcow2.c                      | 15 +++++++++++++++
 tests/qemu-iotests/026             | 31 +++++++++++++++++++++++++++++++
 tests/qemu-iotests/026.out         |  8 ++++++++
 tests/qemu-iotests/026.out.nocache |  8 ++++++++
 4 files changed, 62 insertions(+)

-- 
1.8.3.1

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

end of thread, other threads:[~2013-10-11  7:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11  7:36 [Qemu-devel] [PATCH v2 0/2] qcow2: Undo leaked allocations in co_writev Max Reitz
2013-10-11  7:36 ` [Qemu-devel] [PATCH v2 1/2] " Max Reitz
2013-10-11  7:36 ` [Qemu-devel] [PATCH v2 2/2] qemu-iotests: Extend test 026 Max Reitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).