virtiofsd: Reset O_DIRECT flag during file open
commit65da4539803373ec4eec97ffc49ee90083e56efd
authorVivek Goyal <vgoyal@redhat.com>
Tue, 20 Aug 2019 18:37:46 +0000 (20 14:37 -0400)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:37 +0000 (23 16:41 +0000)
tree0a56e1a9b7c8e3b391dc7291d933b3fbd5eadb43
parentfc1aed0bf96259d0b46b1cfea7497b7762c4ee3d
virtiofsd: Reset O_DIRECT flag during file open

If an application wants to do direct IO and opens a file with O_DIRECT
in guest, that does not necessarily mean that we need to bypass page
cache on host as well. So reset this flag on host.

If somebody needs to bypass page cache on host as well (and it is safe to
do so), we can add a knob in daemon later to control this behavior.

I check virtio-9p and they do reset O_DIRECT flag.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c