mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
block: Remove bdrv_recurse_is_first_non_filter()
It no longer has any users. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20200218103454.296704-11-mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
810803a87c
commit
6b4907cf42
9 changed files with 0 additions and 111 deletions
33
block.c
33
block.c
|
@ -6201,39 +6201,6 @@ int bdrv_amend_options(BlockDriverState *bs, QemuOpts *opts,
|
|||
return bs->drv->bdrv_amend_options(bs, opts, status_cb, cb_opaque, errp);
|
||||
}
|
||||
|
||||
/* This function will be called by the bdrv_recurse_is_first_non_filter method
|
||||
* of block filter and by bdrv_is_first_non_filter.
|
||||
* It is used to test if the given bs is the candidate or recurse more in the
|
||||
* node graph.
|
||||
*/
|
||||
bool bdrv_recurse_is_first_non_filter(BlockDriverState *bs,
|
||||
BlockDriverState *candidate)
|
||||
{
|
||||
/* return false if basic checks fails */
|
||||
if (!bs || !bs->drv) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* the code reached a non block filter driver -> check if the bs is
|
||||
* the same as the candidate. It's the recursion termination condition.
|
||||
*/
|
||||
if (!bs->drv->is_filter) {
|
||||
return bs == candidate;
|
||||
}
|
||||
/* Down this path the driver is a block filter driver */
|
||||
|
||||
/* If the block filter recursion method is defined use it to recurse down
|
||||
* the node graph.
|
||||
*/
|
||||
if (bs->drv->bdrv_recurse_is_first_non_filter) {
|
||||
return bs->drv->bdrv_recurse_is_first_non_filter(bs, candidate);
|
||||
}
|
||||
|
||||
/* the driver is a block filter but don't allow to recurse -> return false
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function checks whether the given @to_replace is allowed to be
|
||||
* replaced by a node that always shows the same data as @bs. This is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue