Skip to main content

virtio_spec/
fs.rs

1//! File System Device
2
3use volatile::access::ReadOnly;
4use volatile_macro::VolatileFieldAccess;
5
6pub use super::features::fs::F;
7use super::le32;
8
9/// Device configuration
10///
11/// Use [`ConfigVolatileFieldAccess`] to work with this struct.
12#[doc(alias = "virtio_fs_config")]
13#[derive(VolatileFieldAccess)]
14#[repr(C)]
15pub struct Config {
16    /// This is the name associated with this file system.  The tag is
17    /// encoded in UTF-8 and padded with NUL bytes if shorter than the
18    /// available space.  This field is not NUL-terminated if the encoded bytes
19    /// take up the entire field.
20    #[access(ReadOnly)]
21    tag: [u8; 36],
22
23    /// This is the total number of request virtqueues
24    /// exposed by the device.  Each virtqueue offers identical functionality and
25    /// there are no ordering guarantees between requests made available on
26    /// different queues.  Use of multiple queues is intended to increase
27    /// performance.
28    #[access(ReadOnly)]
29    num_request_queues: le32,
30
31    /// This is the minimum number of bytes required for each
32    /// buffer in the notification queue.
33    #[access(ReadOnly)]
34    notify_buf_size: le32,
35}