mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
commit: Deal with filters
This includes some permission limiting (for example, we only need to take the RESIZE permission if the base is smaller than the top). Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
2b088c60bb
commit
9a71b9de3f
4 changed files with 79 additions and 28 deletions
|
@ -2703,7 +2703,9 @@ void qmp_block_commit(bool has_job_id, const char *job_id, const char *device,
|
|||
|
||||
assert(bdrv_get_aio_context(base_bs) == aio_context);
|
||||
|
||||
for (iter = top_bs; iter != backing_bs(base_bs); iter = backing_bs(iter)) {
|
||||
for (iter = top_bs; iter != bdrv_filter_or_cow_bs(base_bs);
|
||||
iter = bdrv_filter_or_cow_bs(iter))
|
||||
{
|
||||
if (bdrv_op_is_blocked(iter, BLOCK_OP_TYPE_COMMIT_TARGET, errp)) {
|
||||
goto out;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue