diff options
author | Peter Krempa <pkrempa@redhat.com> | 2020-02-28 13:44:46 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-03-06 17:15:37 +0100 |
commit | 17e1e2be5f9e84e0298e28e70675655b43e225ea (patch) | |
tree | 1f8b9883ffc04846e30d07915eaa0c6c09723919 /block.c | |
parent | eeea1faa099f82328f5831cf252f8ce0a59a9287 (diff) |
block: Introduce 'bdrv_reopen_commit_post' step
Add another step in the reopen process where driver can execute code
after permission changes are comitted.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Message-Id: <adc02cf591c3cb34e98e33518eb1c540a0f27db1.1582893284.git.pkrempa@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -3695,6 +3695,15 @@ cleanup_perm: } } } + + if (ret == 0) { + QTAILQ_FOREACH_REVERSE(bs_entry, bs_queue, entry) { + BlockDriverState *bs = bs_entry->state.bs; + + if (bs->drv->bdrv_reopen_commit_post) + bs->drv->bdrv_reopen_commit_post(&bs_entry->state); + } + } cleanup: QTAILQ_FOREACH_SAFE(bs_entry, bs_queue, entry, next) { if (ret) { |