diff options
author | Jiachen Zhang | 2020-08-24 12:59:57 +0200 |
---|---|---|
committer | Dr. David Alan Gilbert | 2020-09-25 13:45:58 +0200 |
commit | e12a0edafeb5019aac74114b62a4703f79c5c693 (patch) | |
tree | badeaa53bb34f24540bf03dc00e536483eaa61f1 /linux-headers/linux | |
parent | virtiofsd: Used glib "shared" thread pool (diff) | |
download | qemu-e12a0edafeb5019aac74114b62a4703f79c5c693.tar.gz qemu-e12a0edafeb5019aac74114b62a4703f79c5c693.tar.xz qemu-e12a0edafeb5019aac74114b62a4703f79c5c693.zip |
virtiofsd: Add -o allow_direct_io|no_allow_direct_io options
Due to the commit 65da4539803373ec4eec97ffc49ee90083e56efd, the O_DIRECT
open flag of guest applications will be discarded by virtiofsd. While
this behavior makes it consistent with the virtio-9p scheme when guest
applications use direct I/O, we no longer have any chance to bypass the
host page cache.
Therefore, we add a flag 'allow_direct_io' to lo_data. If '-o
no_allow_direct_io' option is added, or none of '-o allow_direct_io' or
'-o no_allow_direct_io' is added, the 'allow_direct_io' will be set to
0, and virtiofsd discards O_DIRECT as before. If '-o allow_direct_io'
is added to the starting command-line, 'allow_direct_io' will be set to
1, so that the O_DIRECT flags will be retained and host page cache can
be bypassed.
Signed-off-by: Jiachen Zhang <zhangjiachen.jaycee@bytedance.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200824105957.61265-1-zhangjiachen.jaycee@bytedance.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'linux-headers/linux')
0 files changed, 0 insertions, 0 deletions