From: Marcelo Tosatti <mtosatti@redhat.com>
To: Kevin Wolf <kwolf@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, 6 Dec 2011 14:35:03 -0200 [thread overview]
Message-ID: <20111206163503.GA18350@amt.cnet> (raw)
In-Reply-To: <4EDE32D7.307@redhat.com>
On Tue, Dec 06, 2011 at 04:20:55PM +0100, Kevin Wolf wrote:
> 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.
Hum, generalising sounds overly complicated (and there is a time
constraint to this). IMHO a cache internal to add-cow.c just to avoid
reading the entire bitmap would do the trick.
next prev parent reply other threads:[~2011-12-06 16:35 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 [this message]
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=20111206163503.GA18350@amt.cnet \
--to=mtosatti@redhat.com \
--cc=kwolf@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).