[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 074/100] block: refactor bdrv_reopen_commit
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 074/100] block: refactor bdrv_reopen_commit |
Date: |
Fri, 7 Jul 2017 19:08:29 +0200 |
From: Vladimir Sementsov-Ogievskiy <address@hidden>
Add bs local variable to simplify code.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: John Snow <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
block.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/block.c b/block.c
index b9e5114..15a4e75 100644
--- a/block.c
+++ b/block.c
@@ -2982,9 +2982,11 @@ error:
void bdrv_reopen_commit(BDRVReopenState *reopen_state)
{
BlockDriver *drv;
+ BlockDriverState *bs;
assert(reopen_state != NULL);
- drv = reopen_state->bs->drv;
+ bs = reopen_state->bs;
+ drv = bs->drv;
assert(drv != NULL);
/* If there are any driver level actions to take */
@@ -2993,13 +2995,13 @@ void bdrv_reopen_commit(BDRVReopenState *reopen_state)
}
/* set BDS specific flags now */
- QDECREF(reopen_state->bs->explicit_options);
+ QDECREF(bs->explicit_options);
- reopen_state->bs->explicit_options = reopen_state->explicit_options;
- reopen_state->bs->open_flags = reopen_state->flags;
- reopen_state->bs->read_only = !(reopen_state->flags & BDRV_O_RDWR);
+ bs->explicit_options = reopen_state->explicit_options;
+ bs->open_flags = reopen_state->flags;
+ bs->read_only = !(reopen_state->flags & BDRV_O_RDWR);
- bdrv_refresh_limits(reopen_state->bs, NULL);
+ bdrv_refresh_limits(bs, NULL);
}
/*
--
1.8.3.1
- [Qemu-block] [PULL 063/100] specs/qcow2: fix bitmap granularity qemu-specific note, (continued)
- [Qemu-block] [PULL 063/100] specs/qcow2: fix bitmap granularity qemu-specific note, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 064/100] specs/qcow2: do not use wording 'bitmap header', Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 065/100] hbitmap: improve dirty iter, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 067/100] block: fix bdrv_dirty_bitmap_granularity signature, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 066/100] tests: add hbitmap iter test, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 068/100] block/dirty-bitmap: add deserialize_ones func, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 069/100] qcow2-refcount: rename inc_refcounts() and make it public, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 071/100] block/dirty-bitmap: fix comment for BlockDirtyBitmap.disabled field, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 072/100] block/dirty-bitmap: add readonly field to BdrvDirtyBitmap, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 070/100] qcow2: add bitmaps extension, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 074/100] block: refactor bdrv_reopen_commit,
Kevin Wolf <=
- [Qemu-block] [PULL 073/100] qcow2: autoloading dirty bitmaps, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 078/100] block: bdrv_close: release bitmaps after drv->bdrv_close, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 075/100] block: new bdrv_reopen_bitmaps_rw interface, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 077/100] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 076/100] qcow2: support .bdrv_reopen_bitmaps_rw, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 079/100] block: introduce persistent dirty bitmaps, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 082/100] qcow2: store bitmaps on reopening image as read-only, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 080/100] block/dirty-bitmap: add bdrv_dirty_bitmap_next(), Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 081/100] qcow2: add persistent dirty bitmaps support, Kevin Wolf, 2017/07/07
- [Qemu-block] [PULL 083/100] block: add bdrv_can_store_new_dirty_bitmap, Kevin Wolf, 2017/07/07