]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage_backend_rbd: rename "stat" variable
authorMichael Chapman <mike@very.puzzling.org>
Wed, 11 Dec 2013 08:14:51 +0000 (19:14 +1100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 11 Dec 2013 09:18:15 +0000 (10:18 +0100)
This variable shadows the stat(2) function, which only became visible in
this scope as of commit 9cac8639. Rename the variable so it doesn't
conflict.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
src/storage/storage_backend_rbd.c

index b8a553dc12e1057521a5df12c6878d5e4a9ad729..4b6f18c58ded1e6abc16bb8495864b641a5bb3eb 100644 (file)
@@ -314,8 +314,8 @@ static int virStorageBackendRBDRefreshPool(virConnectPtr conn,
         goto cleanup;
     }
 
-    struct rados_cluster_stat_t stat;
-    if (rados_cluster_stat(ptr.cluster, &stat) < 0) {
+    struct rados_cluster_stat_t clusterstat;
+    if (rados_cluster_stat(ptr.cluster, &clusterstat) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                        _("failed to stat the RADOS cluster"));
         goto cleanup;
@@ -329,13 +329,13 @@ static int virStorageBackendRBDRefreshPool(virConnectPtr conn,
         goto cleanup;
     }
 
-    pool->def->capacity = stat.kb * 1024;
-    pool->def->available = stat.kb_avail * 1024;
+    pool->def->capacity = clusterstat.kb * 1024;
+    pool->def->available = clusterstat.kb_avail * 1024;
     pool->def->allocation = poolstat.num_bytes;
 
     VIR_DEBUG("Utilization of RBD pool %s: (kb: %llu kb_avail: %llu num_bytes: %llu)",
-              pool->def->source.name, (unsigned long long)stat.kb,
-              (unsigned long long)stat.kb_avail,
+              pool->def->source.name, (unsigned long long)clusterstat.kb,
+              (unsigned long long)clusterstat.kb_avail,
               (unsigned long long)poolstat.num_bytes);
 
     while (true) {