]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd/migration: close source image in OpenSourceImageRequest
authorIlya Dryomov <idryomov@gmail.com>
Fri, 26 Jul 2024 10:13:08 +0000 (12:13 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sat, 10 Aug 2024 20:56:21 +0000 (22:56 +0200)
commit870afd8a0d48f70c3b1392f56ac6480f54f4c2d6
treefabdd02de62efa88a621821e01fb516823d86cdf
parent705a6570627b4a4e560dfea7c96dbf0e1f5c976c
librbd/migration: close source image in OpenSourceImageRequest

Currently, on errors in FormatInterface::open(), RawFormat disposes
of src_image_ctx, but QCOWFormat doesn't, which is a leak.  Rather than
having each format do it internally, do it in OpenSourceImageRequest.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 63159d6b431470f5edc4b110cebf46865c550689)
src/librbd/migration/OpenSourceImageRequest.cc
src/librbd/migration/RawFormat.cc
src/test/librbd/migration/test_mock_RawFormat.cc