From: Kevin Wolf <kwolf@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: shuming@linux.vnet.ibm.com,
Dong Xu Wang <wdongxu@linux.vnet.ibm.com>,
qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v5] block:add-cow file format
Date: Tue, 06 Dec 2011 16:11:07 +0100 [thread overview]
Message-ID: <4EDE308B.7070600@redhat.com> (raw)
In-Reply-To: <20111206145316.GA17987@amt.cnet>
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
next prev parent reply other threads:[~2011-12-06 15:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-15 5:28 [Qemu-devel] [PATCH v5] block:add-cow file format Dong Xu Wang
2011-11-28 2:11 ` Dong Xu Wang
2011-12-05 1:38 ` Dong Xu Wang
2011-12-06 12:48 ` Marcelo Tosatti
2011-12-06 12:59 ` Kevin Wolf
2011-12-06 14:53 ` Marcelo Tosatti
2011-12-06 15:06 ` Marcelo Tosatti
2011-12-06 15:20 ` Kevin Wolf
2011-12-06 16:35 ` Marcelo Tosatti
2011-12-06 16:40 ` Marcelo Tosatti
2011-12-06 16:43 ` Kevin Wolf
2011-12-06 15:11 ` Kevin Wolf [this message]
2011-12-06 14:56 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EDE308B.7070600@redhat.com \
--to=kwolf@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shuming@linux.vnet.ibm.com \
--cc=stefanha@linux.vnet.ibm.com \
--cc=wdongxu@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).