]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd/api/Mirror: return EINVAL from image_resync()
authorRamana Raja <rraja@redhat.com>
Tue, 6 May 2025 20:19:09 +0000 (16:19 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 23 Jun 2025 07:36:01 +0000 (09:36 +0200)
commitc16bdd3ef1844e7f72fba4af7163d3a1ab741336
tree7a6a4ef0da3890f24b4023db6383d9e6b77d5f5c
parentdeaed152e735f2591e80d1877ff53a12059e3c86
librbd/api/Mirror: return EINVAL from image_resync()

... when mirroring is not enabled for the image.

Mirror::image_resync() returns ENOENT when mirroring is disabled for the
image. Instead, make it return EINVAL indicating that the call is
invalid when mirroring is not enabled for the image. This also causes
the public facing C, C++, and Python APIs that resync an image to
return EINVAL or raise an equivalent exception when mirroring is not
enabled for the image.

Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit 4c992e6c8555ba370717c11d9d8ead1a52f97968)
PendingReleaseNotes
src/librbd/api/Mirror.cc
src/test/pybind/test_rbd.py