From c6fd7e6d23ff6f3d37d2a399811a3a364c379e06 Mon Sep 17 00:00:00 2001 From: Luo Yifan Date: Wed, 20 Nov 2024 11:21:33 +0800 Subject: [PATCH] block_int: make bdrv_backing_overridden static cherry picked from commit fa8fc1d09f9b4deaf764420ac11d8b3c88f8af60 bdrv_backing_overridden is only used in block.c, so there is no need to leave it in block_int.h Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi Message-Id: <20211215121140.456939-2-eesposit@redhat.com> Signed-off-by: Kevin Wolf Signed-off-by: Luo Yifan --- block.c | 4 +++- include/block/block_int.h | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index a91117abda..377dd247e2 100644 --- a/block.c +++ b/block.c @@ -107,6 +107,8 @@ static int bdrv_reopen_prepare(BDRVReopenState *reopen_state, static void bdrv_reopen_commit(BDRVReopenState *reopen_state); static void bdrv_reopen_abort(BDRVReopenState *reopen_state); +static bool bdrv_backing_overridden(BlockDriverState *bs); + /* If non-zero, use only whitelisted block drivers */ static int use_bdrv_whitelist; @@ -7543,7 +7545,7 @@ static bool append_strong_runtime_options(QDict *d, BlockDriverState *bs) /* Note: This function may return false positives; it may return true * even if opening the backing file specified by bs's image header * would result in exactly bs->backing. */ -bool bdrv_backing_overridden(BlockDriverState *bs) +static bool bdrv_backing_overridden(BlockDriverState *bs) { if (bs->backing) { return strcmp(bs->auto_backing_file, diff --git a/include/block/block_int.h b/include/block/block_int.h index 701f031102..1ada6cc12d 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -1124,9 +1124,6 @@ BlockDriver *bdrv_probe_all(const uint8_t *buf, int buf_size, void bdrv_parse_filename_strip_prefix(const char *filename, const char *prefix, QDict *options); -bool bdrv_backing_overridden(BlockDriverState *bs); - - /** * bdrv_add_aio_context_notifier: * -- Gitee