summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSitsofe Wheeler <sitsofe@yahoo.com>2017-08-16 21:45:35 +0100
committerSitsofe Wheeler <sitsofe@yahoo.com>2017-08-16 22:26:02 +0100
commitfb9bc6e3ddba81b9455870bbe00e4c60352067a8 (patch)
tree392375e0c4d263ff35dd697fd1c9126dbb045f4e /configure
parentaed4796b989d3b33f86fb3be6b915e532df2d59d (diff)
downloadfio-fb9bc6e3ddba81b9455870bbe00e4c60352067a8.tar.gz
fio-fb9bc6e3ddba81b9455870bbe00e4c60352067a8.tar.bz2
configure: fail rbd configure check on wrong rados_create2 signature
Alter the rbd/rados/ceph configure check so it will fail if the rados_create2() signature is incorrect or if the function is unavailable. Completes the suggestion in commit ff56a4e2e0a87e4e3b1cc1e74547d55b295967a6 ("travis: don't enable rbd"). Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure b/configure
index afb88cac..59af1b6c 100755
--- a/configure
+++ b/configure
@@ -1483,12 +1483,16 @@ int main(int argc, char **argv)
{
rados_t cluster;
rados_ioctx_t io_ctx;
+ const char cluster_name[] = "ceph";
+ const char user_name[] = "client.admin";
const char pool[] = "rbd";
-
int major, minor, extra;
- rbd_version(&major, &minor, &extra);
+ rbd_version(&major, &minor, &extra);
+ /* The rados_create2 signature required was only introduced in ceph 0.65 */
+ rados_create2(&cluster, cluster_name, user_name, 0);
rados_ioctx_create(cluster, pool, &io_ctx);
+
return 0;
}
EOF