[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 07/21] block: bdrv_check_perm(): process children anyway
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v7 07/21] block: bdrv_check_perm(): process children anyway |
Date: |
Wed, 21 Oct 2020 17:58:45 +0300 |
Do generic processing even for drivers which define .bdrv_check_perm
handler. It's needed for further preallocate filter: it will need to do
additional action on bdrv_check_perm, but don't want to reimplement
generic logic.
The patch doesn't change existing behaviour: the only driver that
implements bdrv_check_perm is file-posix, but it never has any
children.
Also, bdrv_set_perm() don't stop processing if driver has
.bdrv_set_perm handler as well.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
block.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index 430edf79bb..4f7c27aa6d 100644
--- a/block.c
+++ b/block.c
@@ -2048,8 +2048,11 @@ static int bdrv_check_perm(BlockDriverState *bs,
BlockReopenQueue *q,
}
if (drv->bdrv_check_perm) {
- return drv->bdrv_check_perm(bs, cumulative_perms,
- cumulative_shared_perms, errp);
+ ret = drv->bdrv_check_perm(bs, cumulative_perms,
+ cumulative_shared_perms, errp);
+ if (ret < 0) {
+ return ret;
+ }
}
/* Drivers that never have children can omit .bdrv_child_perm() */
--
2.21.3
- [PATCH v7 02/21] block/io.c: drop assertion on double waiting for request serialisation, (continued)
- [PATCH v7 02/21] block/io.c: drop assertion on double waiting for request serialisation, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 01/21] block: simplify comment to BDRV_REQ_SERIALISING, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 03/21] block/io: split out bdrv_find_conflicting_request, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 04/21] block/io: bdrv_wait_serialising_requests_locked: drop extra bs arg, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 05/21] block: bdrv_mark_request_serialising: split non-waiting function, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 06/21] block: introduce BDRV_REQ_NO_WAIT flag, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 14/21] scripts/simplebench: support iops, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 08/21] block: introduce preallocate filter, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 09/21] qemu-io: add preallocate mode parameter for truncate command, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 16/21] simplebench: rename ascii() to results_to_text(), Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 07/21] block: bdrv_check_perm(): process children anyway,
Vladimir Sementsov-Ogievskiy <=
- [PATCH v7 15/21] scripts/simplebench: use standard deviation for +- error, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 10/21] iotests: qemu_io_silent: support --image-opts, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 11/21] iotests.py: execute_setup_common(): add required_fmts argument, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 12/21] iotests: add 298 to test new preallocate filter driver, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 13/21] scripts/simplebench: fix grammar: s/successed/succeeded/, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 17/21] simplebench: move results_to_text() into separate file, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 18/21] simplebench/results_to_text: improve view of the table, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 20/21] simplebench/results_to_text: make executable, Vladimir Sementsov-Ogievskiy, 2020/10/21
- [PATCH v7 19/21] simplebench/results_to_text: add difference line to the table, Vladimir Sementsov-Ogievskiy, 2020/10/21