Re: [libvirt] PATCH: Disable QEMU drive caching

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

 



On Wed, Oct 08, 2008 at 11:53:14AM -0500, Anthony Liguori wrote:
> Daniel P. Berrange wrote:
> >On Wed, Oct 08, 2008 at 10:51:16AM -0500, Anthony Liguori wrote:
> >  
> >>A great deal of virtualization users are doing some form of homogeneous 
> >>consolidation.  If they have a good set of management tools or 
> >>sophisticated storage, then their guests will be sharing base images or 
> >>something like that.  Caching in the host will result in major 
> >>performance improvements because otherwise, the same data will be 
> >>fetched multiple times.
> >>    
> >
> >NB, this has no impact on caching of backing files - QEMU masks out
> >the O_DIRECT flag when opening the backing file
> 
> It doesn't mask out O_DIRECT, it just doesn't pass any flags to the 
> backing file when it opens it.  IMHO, this is a bug.

Perhaps I'm interpreting the wrong bit of code, but I was looking at
QEMU's  block.c in the bdrv_open2() function. The last thing it does
is this, which masks out all flags except for the open mode:

    if (bs->backing_file[0] != '\0') {

        if (bdrv_open(bs->backing_hd, backing_filename, flags & (BDRV_O_RDONLY | BDRV_O_RDWR)) < 0)
            goto fail;
    }


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]