summaryrefslogtreecommitdiffstats
path: root/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'block.c')
-rw-r--r--block.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/block.c b/block.c
index a18f052374..e73b262871 100644
--- a/block.c
+++ b/block.c
@@ -6304,6 +6304,23 @@ BlockStatsSpecific *bdrv_get_specific_stats(BlockDriverState *bs)
return drv->bdrv_get_specific_stats(bs);
}
+#ifdef CONFIG_BDRV_CLUSTER_INFO
+int bdrv_get_cluster_info(BlockDriverState *bs, uint64_t offset)
+{
+ BlockDriver *drv = bs->drv;
+
+ if (!drv) {
+ return -ENOMEDIUM;
+ }
+
+ if (drv->bdrv_get_cluster_info) {
+ return drv->bdrv_get_cluster_info(bs, offset);
+ }
+
+ return -ENOTSUP;
+}
+#endif
+
void bdrv_debug_event(BlockDriverState *bs, BlkdebugEvent event)
{
IO_CODE();