[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 53/69] block: Drop superfluous invalidating bs->file
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 53/69] block: Drop superfluous invalidating bs->file from drivers |
Date: |
Thu, 12 May 2016 16:35:33 +0200 |
From: Fam Zheng <address@hidden>
Now they are invalidated by the block layer, so it's not necessary to
do this in block drivers' implementations of .bdrv_invalidate_cache.
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2.c | 7 -------
block/qed.c | 6 ------
block/quorum.c | 16 ----------------
3 files changed, 29 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 555627a..62febfc 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1757,13 +1757,6 @@ static void qcow2_invalidate_cache(BlockDriverState *bs,
Error **errp)
qcow2_close(bs);
- bdrv_invalidate_cache(bs->file->bs, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- bs->drv = NULL;
- return;
- }
-
memset(s, 0, sizeof(BDRVQcow2State));
options = qdict_clone_shallow(bs->options);
diff --git a/block/qed.c b/block/qed.c
index 6cfd4c1..10ce18e 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -1594,12 +1594,6 @@ static void bdrv_qed_invalidate_cache(BlockDriverState
*bs, Error **errp)
bdrv_qed_close(bs);
- bdrv_invalidate_cache(bs->file->bs, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- return;
- }
-
memset(s, 0, sizeof(BDRVQEDState));
ret = bdrv_qed_open(bs, NULL, bs->open_flags, &local_err);
if (local_err) {
diff --git a/block/quorum.c b/block/quorum.c
index da15465..8f7c099 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -747,21 +747,6 @@ static int64_t quorum_getlength(BlockDriverState *bs)
return result;
}
-static void quorum_invalidate_cache(BlockDriverState *bs, Error **errp)
-{
- BDRVQuorumState *s = bs->opaque;
- Error *local_err = NULL;
- int i;
-
- for (i = 0; i < s->num_children; i++) {
- bdrv_invalidate_cache(s->children[i]->bs, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- return;
- }
- }
-}
-
static coroutine_fn int quorum_co_flush(BlockDriverState *bs)
{
BDRVQuorumState *s = bs->opaque;
@@ -1070,7 +1055,6 @@ static BlockDriver bdrv_quorum = {
.bdrv_aio_readv = quorum_aio_readv,
.bdrv_aio_writev = quorum_aio_writev,
- .bdrv_invalidate_cache = quorum_invalidate_cache,
.bdrv_detach_aio_context = quorum_detach_aio_context,
.bdrv_attach_aio_context = quorum_attach_aio_context,
--
1.8.3.1
- [Qemu-block] [PULL 37/69] fdc: Switch to byte-based block access, (continued)
- [Qemu-block] [PULL 37/69] fdc: Switch to byte-based block access, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 44/69] nbd: Switch to byte-based block access, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 45/69] qemu-img: Switch to byte-based block access, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 42/69] m25p80: Switch to byte-based block access, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 47/69] block: Kill unused sector-based blk_* functions, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 43/69] atapi: Switch to byte-based block access, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 41/69] sd: Switch to byte-based block access, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 48/69] qcow2: improve qcow2_co_write_zeroes(), Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 39/69] onenand: Switch to byte-based block access, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 52/69] block: Invalidate all children, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 53/69] block: Drop superfluous invalidating bs->file from drivers,
Kevin Wolf <=
- [Qemu-block] [PULL 55/69] iotests: fix the redirection order in 083, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 57/69] Add new block driver interface to add/delete a BDS's child, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 59/69] qmp: add monitor command to add/remove a child, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 60/69] qemu-io: Add missing option documentation, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 36/69] xen_disk: Switch to byte-based aio block access, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 54/69] block: Inactivate all children, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 61/69] qemu-io: Make 'open' subcommand more like command line, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 46/69] qemu-io: Switch to byte-based block access, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 68/69] block: enable testing of LUKS driver with block I/O tests, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 50/69] block: Honor BDRV_REQ_FUA during write_zeroes, Kevin Wolf, 2016/05/12