[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5] block:add-cow file format
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v5] block:add-cow file format |
Date: |
Tue, 06 Dec 2011 16:11:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 |
Am 06.12.2011 15:53, schrieb Marcelo Tosatti:
> On Tue, Dec 06, 2011 at 01:59:48PM +0100, Kevin Wolf wrote:
>>>> +
>>>> + ret = bdrv_pread(bs->file, sizeof(header), state->bitmap,
>>>> + state->bitmap_size);
>>>> + if (ret != state->bitmap_size) {
>>>> + goto fail;
>>>> + }
>>>
>>> Reading the entire bitmap in memory is not acceptable, it may be huge.
>>> Better mmap it and use msync(MS_SYNC) when writing it back. This way the
>>> host can free memory easily upon pressure.
>>
>> You can't use mmap in block drivers. It would only work with raw-posix
>> backends, if at all.
>
> This is just the bitmap, a plain file. Why would you want to use
> anything other than a plain file to use as storage for the bitmap?
The obvious case is raw-win32. There are probably not so obvious, but
still valid use cases that involve things like NBD, iSCSI, blkdebug or
whatever.
Kevin
- Re: [Qemu-devel] [PATCH v5] block:add-cow file format, Dong Xu Wang, 2011/12/04
- Re: [Qemu-devel] [PATCH v5] block:add-cow file format, Marcelo Tosatti, 2011/12/06
- Re: [Qemu-devel] [PATCH v5] block:add-cow file format, Kevin Wolf, 2011/12/06
- Re: [Qemu-devel] [PATCH v5] block:add-cow file format, Marcelo Tosatti, 2011/12/06
- Re: [Qemu-devel] [PATCH v5] block:add-cow file format, Marcelo Tosatti, 2011/12/06
- Re: [Qemu-devel] [PATCH v5] block:add-cow file format, Kevin Wolf, 2011/12/06
- Re: [Qemu-devel] [PATCH v5] block:add-cow file format, Marcelo Tosatti, 2011/12/06
- Re: [Qemu-devel] [PATCH v5] block:add-cow file format, Kevin Wolf, 2011/12/06
- Re: [Qemu-devel] [PATCH v5] block:add-cow file format, Marcelo Tosatti, 2011/12/06
- Re: [Qemu-devel] [PATCH v5] block:add-cow file format,
Kevin Wolf <=
Re: [Qemu-devel] [PATCH v5] block:add-cow file format, Kevin Wolf, 2011/12/06