qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] questions about AIO Bitmap
@ 2013-08-16 13:39 Yaodong Yang
  2013-08-16 14:45 ` Laszlo Ersek
  0 siblings, 1 reply; 3+ messages in thread
From: Yaodong Yang @ 2013-08-16 13:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: Yaodong Yang

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

Hello everyone,

in QEMU 1.5.1, block-migration.c, there is a function below:

static void alloc_aio_bitmap(BlkMigDevState *bmds)
{
    BlockDriverState *bs = bmds->bs;
    int64_t bitmap_size;

    bitmap_size = (bdrv_getlength(bs) >> BDRV_SECTOR_BITS) +
            BDRV_SECTORS_PER_DIRTY_CHUNK * 8 - 1;
    bitmap_size /= BDRV_SECTORS_PER_DIRTY_CHUNK * 8;

    bmds->aio_bitmap = g_malloc0(bitmap_size);
}

I do not understand the calculation for the bitmap_size. Could someone explain it for me? 

Also, what's the difference between aio_bitmap and dirty_bitmap? How to calculate the size for dirty_bitmap?

Thanks!

Yaodong

[-- Attachment #2.1: Type: text/html, Size: 1025 bytes --]

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

end of thread, other threads:[~2013-08-16 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-16 13:39 [Qemu-devel] questions about AIO Bitmap Yaodong Yang
2013-08-16 14:45 ` Laszlo Ersek
2013-08-16 15:25   ` Yaodong Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).