summaryrefslogtreecommitdiff
path: root/block/qcow2-refcount.c
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2018-02-05 16:33:06 +0200
committerMax Reitz <mreitz@redhat.com>2018-02-13 16:59:59 +0100
commit2d135ee92d656f824504b603054435297552bd8b (patch)
tree473d259e88c28336e1dd7efa54d0ba23e6d6aa44 /block/qcow2-refcount.c
parentebe988f318e1dc89d83572da4ba545619514ad1e (diff)
downloadqemu-2d135ee92d656f824504b603054435297552bd8b.tar.gz
qcow2: Remove BDS parameter from qcow2_cache_entry_mark_dirty()
This function was only using the BlockDriverState parameter to pass it to qcow2_cache_get_table_idx(). This is no longer necessary so this parameter can be removed. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 5c40516a91782b083c1428b7b6a41bb9e2679bfb.1517840876.git.berto@igalia.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/qcow2-refcount.c')
-rw-r--r--block/qcow2-refcount.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 92701ab7af..5434e7d4c8 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -421,7 +421,7 @@ static int alloc_refcount_block(BlockDriverState *bs,
/* Now the new refcount block needs to be written to disk */
BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC_WRITE);
- qcow2_cache_entry_mark_dirty(bs, s->refcount_block_cache, *refcount_block);
+ qcow2_cache_entry_mark_dirty(s->refcount_block_cache, *refcount_block);
ret = qcow2_cache_flush(bs, s->refcount_block_cache);
if (ret < 0) {
goto fail;
@@ -623,7 +623,7 @@ int64_t qcow2_refcount_area(BlockDriverState *bs, uint64_t start_offset,
goto fail;
}
memset(refblock_data, 0, s->cluster_size);
- qcow2_cache_entry_mark_dirty(bs, s->refcount_block_cache,
+ qcow2_cache_entry_mark_dirty(s->refcount_block_cache,
refblock_data);
new_table[i] = block_offset;
@@ -656,7 +656,7 @@ int64_t qcow2_refcount_area(BlockDriverState *bs, uint64_t start_offset,
s->set_refcount(refblock_data, j, 1);
}
- qcow2_cache_entry_mark_dirty(bs, s->refcount_block_cache,
+ qcow2_cache_entry_mark_dirty(s->refcount_block_cache,
refblock_data);
}
@@ -845,8 +845,7 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,
}
old_table_index = table_index;
- qcow2_cache_entry_mark_dirty(bs, s->refcount_block_cache,
- refcount_block);
+ qcow2_cache_entry_mark_dirty(s->refcount_block_cache, refcount_block);
/* we can update the count and save it */
block_index = cluster_index & (s->refcount_block_size - 1);
@@ -1316,8 +1315,7 @@ int qcow2_update_snapshot_refcount(BlockDriverState *bs,
s->refcount_block_cache);
}
l2_table[j] = cpu_to_be64(entry);
- qcow2_cache_entry_mark_dirty(bs, s->l2_table_cache,
- l2_table);
+ qcow2_cache_entry_mark_dirty(s->l2_table_cache, l2_table);
}
}
@@ -3180,7 +3178,7 @@ static int qcow2_discard_refcount_block(BlockDriverState *bs,
}
s->set_refcount(refblock, block_index, 0);
- qcow2_cache_entry_mark_dirty(bs, s->refcount_block_cache, refblock);
+ qcow2_cache_entry_mark_dirty(s->refcount_block_cache, refblock);
qcow2_cache_put(bs, s->refcount_block_cache, &refblock);