提交 ab342e99 编写于 作者: W Wido den Hollander 提交者: John Ferlan

rbd: rbd_diff_iterate2() is available in librbd since 266

In commit 0b15f920 there is a #ifdef which requires LIBRBD_VERSION_CODE
266 or newer for rbd_diff_iterate2()

rbd_diff_iterate2() is available since 266, so this if-statement should
require anything newer than 265.
Signed-off-by: NWido den Hollander <wido@widodh.nl>
上级 b61871c0
...@@ -792,8 +792,10 @@ virStorageBackendRBDSnapshotFindNoDiff(rbd_image_t image, ...@@ -792,8 +792,10 @@ virStorageBackendRBDSnapshotFindNoDiff(rbd_image_t image,
* rbd_diff_iterate2() is available in versions above Ceph 0.94 (Hammer) * 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() * It uses a object map inside Ceph which is faster than rbd_diff_iterate()
* which iterates all objects. * which iterates all objects.
* LIBRBD_VERSION_CODE for Ceph 0.94 is 265. In 266 and upwards diff_iterate2
* is available
*/ */
#if LIBRBD_VERSION_CODE > 266 #if LIBRBD_VERSION_CODE > 265
r = rbd_diff_iterate2(image, snaps[i].name, 0, info.size, 0, 1, r = rbd_diff_iterate2(image, snaps[i].name, 0, info.size, 0, 1,
virStorageBackendRBDIterateCb, (void *)&diff); virStorageBackendRBDIterateCb, (void *)&diff);
#else #else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册