qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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:20:55 +0100	[thread overview]
Message-ID: <4EDE32D7.307@redhat.com> (raw)
In-Reply-To: <20111206150610.GA18056@amt.cnet>

Am 06.12.2011 16:06, schrieb Marcelo Tosatti:
> On Tue, Dec 06, 2011 at 12:53:16PM -0200, Marcelo Tosatti wrote:
>> 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.
>>>
>>> Kevin
>>
>> 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?
> 
> Well, mmap'ing would make life much simpler, but it has limitations such 
> as portability.
> 
> Then what is necessary is a cache similar to qcow2's metadata cache.

Right, we can probably generalise the qcow2 code and make it available
for other drivers as well.

Kevin

  reply	other threads:[~2011-12-06 15:18 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 [this message]
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
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=4EDE32D7.307@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).