|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [Qemu-devel] [PATCH 2/8] qcow2: add dirty-bitmaps feature |
Date: | Fri, 14 Aug 2015 20:14:46 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 10.06.2015 17:30, Stefan Hajnoczi wrote:
On Mon, Jun 08, 2015 at 06:21:20PM +0300, Vladimir Sementsov-Ogievskiy wrote:+ ret = bdrv_pread(bs->file, bm->l1_table_offset, l1_table, + bm->l1_size * sizeof(uint64_t)); + if (ret < 0) { + goto fail; + } + + buf = g_malloc0(bm->l1_size * s->cluster_size);What is the maximum l1_size value? cluster_size and l1_size are 32-bit so with 64 KB cluster_size this overflows if l1_size > 65535. Do you want to cast to size_t?
Hmm. What the maximum RAM space we'd like to spend on dirty bitmap? I think 4Gb is too much.. So here should be limited not the l1_size but number of bytes needed to store the bitmap. What is maximum disk size we are dealing with?
-- Best regards, Vladimir * now, @virtuozzo.com instead of @parallels.com. Sorry for this inconvenience.
[Prev in Thread] | Current Thread | [Next in Thread] |