All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] qcow2: don't leave partially initialized file on image creation
@ 2020-12-09 20:33 Maxim Levitsky
  2020-12-09 20:33 ` [PATCH v5 1/4] crypto: luks: Fix tiny memory leak Maxim Levitsky
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Maxim Levitsky @ 2020-12-09 20:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Maxim Levitsky, Alberto Garcia, qemu-block, Max Reitz

Use the bdrv_co_delete_file interface to delete the underlying
file if qcow2 initialization fails (e.g due to bad encryption secret)

This makes the qcow2 driver behave the same way as the luks driver behaves.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1845353

V3: addressed review feedback and reworked commit messages

V4: got rid of code duplication by adding bdrv_co_delete_file_noerr
and made the qcow2 driver use this function to delete
both the main and the data file.

V5: addresssed review feedback on reworked version.

Best regards,
	Maxim Levitsky

Maxim Levitsky (4):
  crypto: luks: Fix tiny memory leak
  block: add bdrv_co_delete_file_noerr
  crypto: luks: use bdrv_co_delete_file_noerr
  block: qcow2: remove the created file on initialization error

 block.c               | 24 ++++++++++++++++++++++++
 block/crypto.c        | 13 ++-----------
 block/qcow2.c         |  6 ++++--
 include/block/block.h |  1 +
 4 files changed, 31 insertions(+), 13 deletions(-)

-- 
2.26.2




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

end of thread, other threads:[~2020-12-10 11:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 20:33 [PATCH v5 0/4] qcow2: don't leave partially initialized file on image creation Maxim Levitsky
2020-12-09 20:33 ` [PATCH v5 1/4] crypto: luks: Fix tiny memory leak Maxim Levitsky
2020-12-10 10:28   ` Vladimir Sementsov-Ogievskiy
2020-12-09 20:33 ` [PATCH v5 2/4] block: add bdrv_co_delete_file_noerr Maxim Levitsky
2020-12-10 10:54   ` Vladimir Sementsov-Ogievskiy
2020-12-10 11:47     ` Maxim Levitsky
2020-12-09 20:33 ` [PATCH v5 3/4] crypto: luks: use bdrv_co_delete_file_noerr Maxim Levitsky
2020-12-10 10:55   ` Vladimir Sementsov-Ogievskiy
2020-12-09 20:33 ` [PATCH v5 4/4] block: qcow2: remove the created file on initialization error Maxim Levitsky
2020-12-10 11:00   ` Vladimir Sementsov-Ogievskiy
2020-12-10 11:02     ` Maxim Levitsky

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.