All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] mirror: fix improperly filled copy_bitmap for mirror block job
@ 2016-09-09 12:31 Denis V. Lunev
  2016-09-09 12:31 ` [Qemu-devel] [PATCH 1/2] block: sync bdrv_co_get_block_status_above() with bdrv_is_allocated_above() Denis V. Lunev
  2016-09-09 12:31 ` [Qemu-devel] [PATCH 2/2] mirror: fix improperly filled copy_bitmap for mirror block job Denis V. Lunev
  0 siblings, 2 replies; 7+ messages in thread
From: Denis V. Lunev @ 2016-09-09 12:31 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Denis V. Lunev, Stefan Hajnoczi, Fam Zheng,
	Kevin Wolf, Max Reitz, Jeff Cody

bdrv_is_allocated_above() returns true in the case even for completel
zeroed areas as BDRV_BLOCK_ALLOCATED flag is set in both cases.

The patch stops using bdrv_is_allocated_above() wrapper and switches to
bdrv_get_block_status_above() to distinguish zeroed areas and areas with
data to avoid extra IO operations if possible.

Though this change requires some preparations in bdrv_get_block_status_above()
performed in the patch (1).

Changes from v1:
- fixed assert in 041 test case (added patch 1)
- fixed commit message
- fixed status check to be on the safe side

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Fam Zheng <famz@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
CC: Jeff Cody <jcody@redhat.com>

Denis V. Lunev (2):
  block: sync bdrv_co_get_block_status_above() with
    bdrv_is_allocated_above()
  mirror: fix improperly filled copy_bitmap for mirror block job

 block/io.c     | 26 ++++++++++++++++++++------
 block/mirror.c | 18 ++++++++++++------
 2 files changed, 32 insertions(+), 12 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-09-13  5:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09 12:31 [Qemu-devel] [PATCH v2 0/2] mirror: fix improperly filled copy_bitmap for mirror block job Denis V. Lunev
2016-09-09 12:31 ` [Qemu-devel] [PATCH 1/2] block: sync bdrv_co_get_block_status_above() with bdrv_is_allocated_above() Denis V. Lunev
2016-09-12 11:22   ` Vladimir Sementsov-Ogievskiy
2016-09-12 12:41   ` Roman Kagan
2016-09-09 12:31 ` [Qemu-devel] [PATCH 2/2] mirror: fix improperly filled copy_bitmap for mirror block job Denis V. Lunev
2016-09-12 21:46   ` Eric Blake
2016-09-13  5:03   ` Jeff Cody

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.