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.