On Wed, Oct 08, 2008 at 12:16:00PM -0500, Anthony Liguori wrote: > Daniel P. Berrange wrote: > >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; > > } > > > if (bs->backing_file[0] != '\0') { > /* if there is a backing file, use it */ > bs->backing_hd = bdrv_new(""); > if (!bs->backing_hd) { > fail: > bdrv_close(bs); > return -ENOMEM; > } > path_combine(backing_filename, sizeof(backing_filename), > filename, bs->backing_file); > if (bdrv_open(bs->backing_hd, backing_filename, 0) < 0) > goto fail; > } > > Is what's in the latest QEMU tree. Is what you're looking at carrying a > patch, perhaps? If so, there may be a bug in the patch. No, I had forgotten that I had updated my checkout to an old changeset to trace some unrelated issue, so wasn't loooking at lastest code. The change to pass '0' was made way back in changeset 2075 when AIO was added 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