From nobody Thu Dec 18 08:10:11 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554270039349776.9719287692865; Tue, 2 Apr 2019 22:40:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8286983F42; Wed, 3 Apr 2019 05:40:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 91E351001DDD; Wed, 3 Apr 2019 05:40:36 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id F3AE5180338A; Wed, 3 Apr 2019 05:40:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x335eVT5030465 for ; Wed, 3 Apr 2019 01:40:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8172B2AFB8; Wed, 3 Apr 2019 05:40:31 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B63E60FE5 for ; Wed, 3 Apr 2019 05:40:30 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Wed, 3 Apr 2019 07:40:17 +0200 Message-Id: <5f4b792c89de76b49ec79ef744e3a6e29da4092f.1554269862.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/10] rbd: drop support for ceph 0.94 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 03 Apr 2019 05:40:38 +0000 (UTC) Commit 21deeaf02fdf216b08210fc899579736973ca81d added a stub for volStorageBackendRBDGetFlags without marking the arguments as unused, thus breaking the build. Now that we require diff_iterate2 to be present, remove all the conditionally compiled code, including the stub function. Signed-off-by: J=C3=A1n Tomko --- src/storage/storage_backend_rbd.c | 39 ------------------------------- 1 file changed, 39 deletions(-) diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backen= d_rbd.c index 61ebb9b541..6fea8fe8c7 100644 --- a/src/storage/storage_backend_rbd.c +++ b/src/storage/storage_backend_rbd.c @@ -436,7 +436,6 @@ volStorageBackendRBDGetFeatures(rbd_image_t image, return ret; } =20 -#if LIBRBD_VERSION_CODE > 265 static int volStorageBackendRBDGetFlags(rbd_image_t image, const char *volname, @@ -500,31 +499,6 @@ virStorageBackendRBDSetAllocation(virStorageVolDefPtr = vol, return ret; } =20 -#else -static int -volStorageBackendRBDGetFlags(rbd_image_t image, - const char *volname, - uint64_t *flags) -{ - *flags =3D 0; - return 0; -} - -static int -volStorageBackendRBDUseFastDiff(uint64_t features ATTRIBUTE_UNUSED, - uint64_t feature_flags ATTRIBUTE_UNUSED) -{ - return false; -} - -static int -virStorageBackendRBDSetAllocation(virStorageVolDefPtr vol ATTRIBUTE_UNUSED, - rbd_image_t *image ATTRIBUTE_UNUSED, - rbd_image_info_t *info ATTRIBUTE_UNUSED) -{ - return false; -} -#endif =20 static int volStorageBackendRBDRefreshVolInfo(virStorageVolDefPtr vol, @@ -1087,21 +1061,8 @@ virStorageBackendRBDSnapshotFindNoDiff(rbd_image_t i= mage, /* The callback will set diff to non-zero if there is a diff */ diff =3D 0; =20 -/* - * rbd_diff_iterate2() is available in versions above Ceph 0.94 (Hammer) - * It uses a object map inside Ceph which is faster than rbd_diff_iterate() - * which iterates all objects. - * LIBRBD_VERSION_CODE for Ceph 0.94 is 265. In 266 and upwards diff_itera= te2 - * is available - */ -#if LIBRBD_VERSION_CODE > 265 r =3D rbd_diff_iterate2(image, snaps[i].name, 0, info.size, 0, 1, virStorageBackendRBDIterateCb, (void *)&diff= ); -#else - r =3D rbd_diff_iterate(image, snaps[i].name, 0, info.size, - virStorageBackendRBDIterateCb, (void *)&diff); -#endif - if (r < 0) { virReportSystemError(-r, _("failed to iterate RBD snapshot %s@= %s"), imgname, snaps[i].name); --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list