[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v22 12/30] block: refactor bdrv_reopen_commit
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[Qemu-devel] [PATCH v22 12/30] block: refactor bdrv_reopen_commit |
Date: |
Wed, 28 Jun 2017 15:05:12 +0300 |
Add bs local variable to simplify code.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: John Snow <address@hidden>
---
block.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/block.c b/block.c
index 694396281b..37d68e3276 100644
--- a/block.c
+++ b/block.c
@@ -2989,9 +2989,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 */
@@ -3000,13 +3002,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);
}
/*
--
2.11.1
- [Qemu-devel] [PATCH v22 02/30] specs/qcow2: do not use wording 'bitmap header', (continued)
- [Qemu-devel] [PATCH v22 02/30] specs/qcow2: do not use wording 'bitmap header', Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 20/30] qcow2: store bitmaps on reopening image as read-only, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 11/30] qcow2: autoloading dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 05/30] block: fix bdrv_dirty_bitmap_granularity signature, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 17/30] block: introduce persistent dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 21/30] block: add bdrv_can_store_new_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 07/30] qcow2-refcount: rename inc_refcounts() and make it public, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 09/30] block/dirty-bitmap: fix comment for BlockDirtyBitmap.disabled field, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 12/30] block: refactor bdrv_reopen_commit,
Vladimir Sementsov-Ogievskiy <=
- [Qemu-devel] [PATCH v22 25/30] qmp: add x-debug-block-dirty-bitmap-sha256, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 04/30] tests: add hbitmap iter test, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 26/30] iotests: test qcow2 persistent dirty bitmap, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 15/30] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap, Vladimir Sementsov-Ogievskiy, 2017/06/28
- [Qemu-devel] [PATCH v22 19/30] qcow2: add persistent dirty bitmaps support, Vladimir Sementsov-Ogievskiy, 2017/06/28