Re: [PATCH 7/8] save: add virDirectFd wrapper type

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

 



On Tue, Jul 19, 2011 at 10:08:21AM -0600, Eric Blake wrote:
> On 07/19/2011 10:06 AM, Daniel P. Berrange wrote:
> >
> >The motivation for using O_DIRECT is that allowing pollution of the
> >host cache causes stability problems for the host as a whole. As
> >such IMHO, apps would likely want an error back if O_DIRECT cannot
> >be supported,
> >
> >NB, even some Linux filesystems can't do O_DIRECT, so this isn't an
> >obscure mingw32 issue.
> 
> Conversely, open() on Linux silently ignores unknown flags - so if
> you are using a really old kernel but newer glibc headers, then
> O_DIRECT is non-zero and open() succeeds, but you _don't_ get direct
> I/O.
> 
> If O_DIRECT is 0, then it is pretty easy to diagnose that the
> request is unsupported.  But if O_DIRECT is non-zero, then how do I
> tell whether the open(O_DIRECT) really meant that I have direct I/O,
> or whether it was a nice hint but still ignored and I'm still
> polluting the file system cache?

Hmm, I could have sworn we've seen QEMU itself fail to start when
requesting O_DIRECT on say, tmpfs. Perhaps open() isn't failing,
but rather read/write fail ?

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]