diff options
author | Hu Tao <hutao@cn.fujitsu.com> | 2013-12-05 14:32:34 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-12-06 16:53:50 +0100 |
commit | ac95acdb8e0876fa489bd31a48e8ecd6ef901d67 (patch) | |
tree | 171e10ba16ec167cbb80fd3cb2750e3b857712af /block/qcow2-cluster.c | |
parent | 405889820bcd5c2abf4eb70598e96f525f862c0f (diff) |
qcow2: use start_of_cluster() and offset_into_cluster() everywhere
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/qcow2-cluster.c')
-rw-r--r-- | block/qcow2-cluster.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 11f9c50aa7..853408438a 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -1401,7 +1401,7 @@ int qcow2_discard_clusters(BlockDriverState *bs, uint64_t offset, /* Round start up and end down */ offset = align_offset(offset, s->cluster_size); - end_offset &= ~(s->cluster_size - 1); + end_offset = start_of_cluster(s, end_offset); if (offset > end_offset) { return 0; |