[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 33/58] file-posix: Remove .bdrv_inactivate/invalidate
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 33/58] file-posix: Remove .bdrv_inactivate/invalidate_cache |
Date: |
Thu, 11 May 2017 16:32:36 +0200 |
Now that the block layer takes care to request a lot less permissions
for inactive nodes, the special-casing in file-posix isn't necessary any
more.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
block/file-posix.c | 33 ---------------------------------
1 file changed, 33 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index a09055b..4354d49 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2190,35 +2190,6 @@ static void raw_abort_perm_update(BlockDriverState *bs)
raw_handle_perm_lock(bs, RAW_PL_ABORT, 0, 0, NULL);
}
-static int raw_inactivate(BlockDriverState *bs)
-{
- int ret;
- uint64_t perm = 0;
- uint64_t shared = BLK_PERM_ALL;
-
- ret = raw_handle_perm_lock(bs, RAW_PL_PREPARE, perm, shared, NULL);
- if (ret) {
- return ret;
- }
- raw_handle_perm_lock(bs, RAW_PL_COMMIT, perm, shared, NULL);
- return 0;
-}
-
-
-static void raw_invalidate_cache(BlockDriverState *bs, Error **errp)
-{
- BDRVRawState *s = bs->opaque;
- int ret;
-
- assert(!(bdrv_get_flags(bs) & BDRV_O_INACTIVE));
- ret = raw_handle_perm_lock(bs, RAW_PL_PREPARE, s->perm, s->shared_perm,
- errp);
- if (ret) {
- return;
- }
- raw_handle_perm_lock(bs, RAW_PL_COMMIT, s->perm, s->shared_perm, NULL);
-}
-
BlockDriver bdrv_file = {
.format_name = "file",
.protocol_name = "file",
@@ -2249,8 +2220,6 @@ BlockDriver bdrv_file = {
.bdrv_get_info = raw_get_info,
.bdrv_get_allocated_file_size
= raw_get_allocated_file_size,
- .bdrv_inactivate = raw_inactivate,
- .bdrv_invalidate_cache = raw_invalidate_cache,
.bdrv_check_perm = raw_check_perm,
.bdrv_set_perm = raw_set_perm,
.bdrv_abort_perm_update = raw_abort_perm_update,
@@ -2712,8 +2681,6 @@ static BlockDriver bdrv_host_device = {
.bdrv_get_info = raw_get_info,
.bdrv_get_allocated_file_size
= raw_get_allocated_file_size,
- .bdrv_inactivate = raw_inactivate,
- .bdrv_invalidate_cache = raw_invalidate_cache,
.bdrv_check_perm = raw_check_perm,
.bdrv_set_perm = raw_set_perm,
.bdrv_abort_perm_update = raw_abort_perm_update,
--
1.8.3.1
- [Qemu-block] [PULL 22/58] qemu-iotests: Add test case 153 for image locking, (continued)
- [Qemu-block] [PULL 22/58] qemu-iotests: Add test case 153 for image locking, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 23/58] tests: Add POSIX image locking test case 182, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 24/58] qcow2: Fix preallocation size formula, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 21/58] file-posix: Add image locking to perm operations, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 25/58] qcow2: Reuse preallocated zero clusters, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 26/58] qcow2: Discard preallocated zero clusters, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 27/58] iotests: Extend test 066, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 28/58] migration: Unify block node activation error handling, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 29/58] block: New BdrvChildRole.activate() for blk_resume_after_migration(), Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 30/58] block: Drop permissions when migration completes, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 33/58] file-posix: Remove .bdrv_inactivate/invalidate_cache,
Kevin Wolf <=
- [Qemu-block] [PULL 32/58] block: Fix write/resize permissions for inactive images, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 36/58] blockdev: use drained_begin/end for qmp_block_resize, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 31/58] block: Inactivate parents before children, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 34/58] qemu-img: wait for convert coroutines to complete, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 35/58] nvme: Implement Write Zeroes, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 38/58] qemu-io: Switch 'alloc' command to byte-based length, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 40/58] blkdebug: Sanity check block layer guarantees, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 39/58] qemu-io: Switch 'map' output to byte-based reporting, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 37/58] qemu-io: Improve alignment checks, Kevin Wolf, 2017/05/11
- [Qemu-block] [PULL 41/58] blkdebug: Refactor error injection, Kevin Wolf, 2017/05/11