diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-12-16 22:11:15 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-12-21 17:16:23 +0000 |
commit | 6f7bc7196ff2d7174fec382d66aa5dfea31a7026 (patch) | |
tree | afbd856b03be1f237b52fed97c6495058e548987 /OvmfPkg/Include | |
parent | 867cb9f60caf35d44600b6bdc3dc5252b83de9a1 (diff) | |
download | edk2-6f7bc7196ff2d7174fec382d66aa5dfea31a7026.tar.gz edk2-6f7bc7196ff2d7174fec382d66aa5dfea31a7026.tar.bz2 edk2-6f7bc7196ff2d7174fec382d66aa5dfea31a7026.zip |
OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_WRITE
Add the VirtioFsFuseWrite() function, for sending the FUSE_WRITE command
to the Virtio Filesystem device.
(For avoiding oversized FUSE_WRITE commands, save the maximum write buffer
size that is advertized by the FUSE server, in the session init code.)
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3097
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201216211125.19496-39-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'OvmfPkg/Include')
-rw-r--r-- | OvmfPkg/Include/IndustryStandard/VirtioFs.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OvmfPkg/Include/IndustryStandard/VirtioFs.h b/OvmfPkg/Include/IndustryStandard/VirtioFs.h index fa8c40019f..0b7b3ff80e 100644 --- a/OvmfPkg/Include/IndustryStandard/VirtioFs.h +++ b/OvmfPkg/Include/IndustryStandard/VirtioFs.h @@ -153,6 +153,7 @@ typedef enum { VirtioFsFuseOpRmDir = 11,
VirtioFsFuseOpOpen = 14,
VirtioFsFuseOpRead = 15,
+ VirtioFsFuseOpWrite = 16,
VirtioFsFuseOpStatFs = 17,
VirtioFsFuseOpRelease = 18,
VirtioFsFuseOpFsync = 20,
@@ -283,6 +284,24 @@ typedef struct { } VIRTIO_FS_FUSE_READ_REQUEST;
//
+// Headers for VirtioFsFuseOpWrite.
+//
+typedef struct {
+ UINT64 FileHandle;
+ UINT64 Offset;
+ UINT32 Size;
+ UINT32 WriteFlags;
+ UINT64 LockOwner;
+ UINT32 Flags;
+ UINT32 Padding;
+} VIRTIO_FS_FUSE_WRITE_REQUEST;
+
+typedef struct {
+ UINT32 Size;
+ UINT32 Padding;
+} VIRTIO_FS_FUSE_WRITE_RESPONSE;
+
+//
// Header for VirtioFsFuseOpStatFs.
//
typedef struct {
|