[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 03/14] quorum: Remove s from quorum_aio_get() argumen
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 03/14] quorum: Remove s from quorum_aio_get() arguments |
Date: |
Mon, 9 Jan 2017 14:44:25 +0100 |
There is no point in passing the value of bs->opaque in order to
overwrite it with itself.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
---
block/quorum.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/block/quorum.c b/block/quorum.c
index d122299..dfa9fd3 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -171,18 +171,17 @@ static bool quorum_64bits_compare(QuorumVoteValue *a,
QuorumVoteValue *b)
return a->l == b->l;
}
-static QuorumAIOCB *quorum_aio_get(BDRVQuorumState *s,
- BlockDriverState *bs,
+static QuorumAIOCB *quorum_aio_get(BlockDriverState *bs,
QEMUIOVector *qiov,
uint64_t sector_num,
int nb_sectors,
BlockCompletionFunc *cb,
void *opaque)
{
+ BDRVQuorumState *s = bs->opaque;
QuorumAIOCB *acb = qemu_aio_get(&quorum_aiocb_info, bs, cb, opaque);
int i;
- acb->common.bs->opaque = s;
acb->sector_num = sector_num;
acb->nb_sectors = nb_sectors;
acb->qiov = qiov;
@@ -691,7 +690,7 @@ static BlockAIOCB *quorum_aio_readv(BlockDriverState *bs,
void *opaque)
{
BDRVQuorumState *s = bs->opaque;
- QuorumAIOCB *acb = quorum_aio_get(s, bs, qiov, sector_num,
+ QuorumAIOCB *acb = quorum_aio_get(bs, qiov, sector_num,
nb_sectors, cb, opaque);
acb->is_read = true;
acb->children_read = 0;
@@ -711,7 +710,7 @@ static BlockAIOCB *quorum_aio_writev(BlockDriverState *bs,
void *opaque)
{
BDRVQuorumState *s = bs->opaque;
- QuorumAIOCB *acb = quorum_aio_get(s, bs, qiov, sector_num, nb_sectors,
+ QuorumAIOCB *acb = quorum_aio_get(bs, qiov, sector_num, nb_sectors,
cb, opaque);
int i;
--
1.8.3.1
- [Qemu-block] [PULL 00/14] Block layer patches, Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 01/14] qemu-img: fix in-flight count for qemu-img bench, Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 02/14] coroutine: Introduce qemu_coroutine_enter_if_inactive(), Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 05/14] quorum: Do cleanup in caller coroutine, Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 03/14] quorum: Remove s from quorum_aio_get() arguments,
Kevin Wolf <=
- [Qemu-block] [PULL 04/14] quorum: Implement .bdrv_co_readv/writev, Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 06/14] quorum: Inline quorum_aio_cb(), Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 07/14] quorum: Avoid bdrv_aio_writev() for rewrites, Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 08/14] quorum: Implement .bdrv_co_preadv/pwritev(), Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 09/14] quorum: Inline quorum_fifo_aio_cb(), Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 10/14] quorum: Clean up quorum_aio_get(), Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 11/14] blkdebug: Implement bdrv_co_preadv/pwritev/flush, Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 12/14] blkverify: Implement bdrv_co_preadv/pwritev/flush, Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 13/14] block: Rename raw_bsd to raw-format.c, Kevin Wolf, 2017/01/09
- [Qemu-block] [PULL 14/14] block: Rename raw-{posix, win32} to file-*.c, Kevin Wolf, 2017/01/09