From: Jason Dillaman Date: Wed, 5 Feb 2020 14:27:30 +0000 (-0500) Subject: librbd: corrected error code from image_snapshot_create API X-Git-Tag: v15.1.1~472^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=00a354859f37065d19f4cc199b0e6698e194bb46;p=ceph.git librbd: corrected error code from image_snapshot_create API Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/api/Mirror.cc b/src/librbd/api/Mirror.cc index 88e3bf80e663..56aa2cdb8d16 100644 --- a/src/librbd/api/Mirror.cc +++ b/src/librbd/api/Mirror.cc @@ -1860,7 +1860,7 @@ int Mirror::image_snapshot_create(I *ictx, uint64_t *snap_id) { if (mirror_image.mode != cls::rbd::MIRROR_IMAGE_MODE_SNAPSHOT || mirror_image.state != cls::rbd::MIRROR_IMAGE_STATE_ENABLED) { lderr(cct) << "snapshot based mirroring is not enabled" << dendl; - return r; + return -EINVAL; } C_SaferCond on_finish;