qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5] block:add-cow file format


From: Marcelo Tosatti
Subject: Re: [Qemu-devel] [PATCH v5] block:add-cow file format
Date: Tue, 6 Dec 2011 13:06:10 -0200
User-agent: Mutt/1.5.21 (2010-09-15)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]