}
}
+ {
+ std::lock_guard<std::mutex> l(vstatfs_lock);
+ buf->allocated = vstatfs.allocated();
+ buf->data_stored = vstatfs.stored();
+ buf->data_compressed = vstatfs.compressed();
+ buf->data_compressed_original = vstatfs.compressed_original();
+ buf->data_compressed_allocated = vstatfs.compressed_allocated();
+ }
+
uint64_t thin_total, thin_avail;
if (bdev->get_thin_utilization(&thin_total, &thin_avail)) {
buf->total += thin_total;
// we are limited by both the size of the virtual device and the
// underlying physical device.
bfree = std::min(bfree, thin_avail);
+
+ buf->allocated = thin_total - thin_avail;
} else {
buf->total = bdev->get_size();
}
- buf->omap_allocated;
}
- {
- std::lock_guard<std::mutex> l(vstatfs_lock);
- buf->allocated = vstatfs.allocated();
- buf->data_stored = vstatfs.stored();
- buf->data_compressed = vstatfs.compressed();
- buf->data_compressed_original = vstatfs.compressed_original();
- buf->data_compressed_allocated = vstatfs.compressed_allocated();
- }
-
dout(20) << __func__ << " " << *buf << dendl;
return 0;
}