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#[cfg_attr(
14    feature = "zerocopy",
15    derive(
16        zerocopy_derive::KnownLayout,
17        zerocopy_derive::Immutable,
18        zerocopy_derive::FromBytes,
19    )
20)]
21#[derive(VolatileFieldAccess)]
22#[repr(C)]
23pub struct Config {
24    /// This is the name associated with this file system.  The tag is
25    /// encoded in UTF-8 and padded with NUL bytes if shorter than the
26    /// available space.  This field is not NUL-terminated if the encoded bytes
27    /// take up the entire field.
28    #[access(ReadOnly)]
29    tag: [u8; 36],
30
31    /// This is the total number of request virtqueues
32    /// exposed by the device.  Each virtqueue offers identical functionality and
33    /// there are no ordering guarantees between requests made available on
34    /// different queues.  Use of multiple queues is intended to increase
35    /// performance.
36    #[access(ReadOnly)]
37    num_request_queues: le32,
38
39    /// This is the minimum number of bytes required for each
40    /// buffer in the notification queue.
41    #[access(ReadOnly)]
42    notify_buf_size: le32,
43}