diff options
author | Kevin Wolf <kwolf@redhat.com> | 2012-12-07 18:08:47 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-12-13 15:37:59 +0100 |
commit | 280d373579558f73a8b70e329d9a6206933d3809 (patch) | |
tree | 7cec4982418e7355189da1158cbddc6f71d44eb6 /block/qcow2.c | |
parent | f50f88b9fea09fef12cc293126cf45dcf0ef600b (diff) |
qcow2: Enable dirty flag in qcow2_alloc_cluster_link_l2
This is closer to where the dirty flag is really needed, and it avoids
having checks for special cases related to cluster allocation directly
in the writev loop.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 08d92cc6e3..dbcc0fff97 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -222,7 +222,7 @@ static void report_unsupported_feature(BlockDriverState *bs, * updated successfully. Therefore it is not required to check the return * value of this function. */ -static int qcow2_mark_dirty(BlockDriverState *bs) +int qcow2_mark_dirty(BlockDriverState *bs) { BDRVQcowState *s = bs->opaque; uint64_t val; @@ -803,11 +803,6 @@ static coroutine_fn int qcow2_co_writev(BlockDriverState *bs, goto fail; } - if (l2meta->nb_clusters > 0 && - (s->compatible_features & QCOW2_COMPAT_LAZY_REFCOUNTS)) { - qcow2_mark_dirty(bs); - } - assert((cluster_offset & 511) == 0); qemu_iovec_reset(&hd_qiov); |