pub enum VolumeAndNodeRequest {
Show 36 variants GetInfo { responder: VolumeAndNodeGetInfoResponder, }, GetStats { clear: bool, responder: VolumeAndNodeGetStatsResponder, }, OpenSession { session: ServerEnd<SessionMarker>, control_handle: VolumeAndNodeControlHandle, }, ReadBlocks { vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64, responder: VolumeAndNodeReadBlocksResponder, }, WriteBlocks { vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64, responder: VolumeAndNodeWriteBlocksResponder, }, GetTypeGuid { responder: VolumeAndNodeGetTypeGuidResponder, }, GetInstanceGuid { responder: VolumeAndNodeGetInstanceGuidResponder, }, GetName { responder: VolumeAndNodeGetNameResponder, }, QuerySlices { start_slices: Vec<u64>, responder: VolumeAndNodeQuerySlicesResponder, }, GetVolumeInfo { responder: VolumeAndNodeGetVolumeInfoResponder, }, Extend { start_slice: u64, slice_count: u64, responder: VolumeAndNodeExtendResponder, }, Shrink { start_slice: u64, slice_count: u64, responder: VolumeAndNodeShrinkResponder, }, Destroy { responder: VolumeAndNodeDestroyResponder, }, Clone { flags: OpenFlags, object: ServerEnd<NodeMarker>, control_handle: VolumeAndNodeControlHandle, }, GetAttr { responder: VolumeAndNodeGetAttrResponder, }, SetAttr { flags: NodeAttributeFlags, attributes: NodeAttributes, responder: VolumeAndNodeSetAttrResponder, }, GetFlags { responder: VolumeAndNodeGetFlagsResponder, }, SetFlags { flags: OpenFlags, responder: VolumeAndNodeSetFlagsResponder, }, QueryFilesystem { responder: VolumeAndNodeQueryFilesystemResponder, }, Close { responder: VolumeAndNodeCloseResponder, }, Query { responder: VolumeAndNodeQueryResponder, }, Reopen { rights_request: Option<Box<RightsRequest>>, object_request: ServerEnd<NodeMarker>, control_handle: VolumeAndNodeControlHandle, }, GetConnectionInfo { responder: VolumeAndNodeGetConnectionInfoResponder, }, GetAttributes { query: NodeAttributesQuery, responder: VolumeAndNodeGetAttributesResponder, }, UpdateAttributes { payload: MutableNodeAttributes, responder: VolumeAndNodeUpdateAttributesResponder, }, Sync { responder: VolumeAndNodeSyncResponder, }, ConnectToDeviceFidl { server: Channel, control_handle: VolumeAndNodeControlHandle, }, Bind { driver: String, responder: VolumeAndNodeBindResponder, }, Rebind { driver: String, responder: VolumeAndNodeRebindResponder, }, UnbindChildren { responder: VolumeAndNodeUnbindChildrenResponder, }, ScheduleUnbind { responder: VolumeAndNodeScheduleUnbindResponder, }, GetTopologicalPath { responder: VolumeAndNodeGetTopologicalPathResponder, }, GetMinDriverLogSeverity { responder: VolumeAndNodeGetMinDriverLogSeverityResponder, }, SetMinDriverLogSeverity { severity: LogLevelFilter, responder: VolumeAndNodeSetMinDriverLogSeverityResponder, }, GetCurrentPerformanceState { responder: VolumeAndNodeGetCurrentPerformanceStateResponder, }, SetPerformanceState { requested_state: u32, responder: VolumeAndNodeSetPerformanceStateResponder, },
}
Expand description

This protocol is intended to emulate a block device.

Variants§

§

GetInfo

Get information about the underlying block device.

§

GetStats

Returns stats about the block device on the provided buffer and optionally clears the counters.

storage_metrics.CallStat.bytes_transferred is number of bytes requested to be transferred.

§

OpenSession

Fields

§session: ServerEnd<SessionMarker>

Opens a new FIFO-based session on the block device.

§

ReadBlocks

Fields

§vmo: Vmo
§length: u64
§dev_offset: u64
§vmo_offset: u64

Reads from a block device.

This read does not require exclusive access. length, dev_offset and vmo_offset are specified in bytes, but they must be block-aligned. This method is provided for backward compatibility, and is not intended for new code. New code should use the FIFO interface along with the client libraries to read and write from block devices.

§

WriteBlocks

Fields

§vmo: Vmo
§length: u64
§dev_offset: u64
§vmo_offset: u64

Writes to a block device.

This write does not require exclusive access. length, dev_offset and vmo_offset are specified in bytes, but they must be block-aligned. This method is provided for backward compatibility, and is not intended for new code. New code should use the FIFO interface along with the client libraries to read and write from block devices.

§

GetTypeGuid

Gets the type GUID of the partition (if one exists). If the partition has no type GUID, ZX_ERR_NOT_SUPPORTED is returned.

§

GetInstanceGuid

Gets the instance GUID of the partition (if one exists). If the partition has no instance GUID, ZX_ERR_NOT_SUPPORTED is returned.

§

GetName

Gets the name of the partition (if one exists). If the partition has no name, ZX_ERR_NOT_SUPPORTED is returned.

§

QuerySlices

Fields

§start_slices: Vec<u64>

Returns the number of contiguous allocated (or unallocated) vslices starting from each vslice.

§

GetVolumeInfo

Returns the information about this volume and the volume manager it is embedded in.

§

Extend

Fields

§start_slice: u64
§slice_count: u64

Extends the mapping of this partition.

The ability to extend the partition is dependent on having sufficient free space on the underlying device, having sufficient free slots for tracking the bytes in the volume manager header, and the partition limit (see VolumeManager.SetPartitionLimit).

§

Shrink

Fields

§start_slice: u64
§slice_count: u64

Shrinks a virtual partition. Returns ZX_OK if ANY slices are freed, even if part of the requested range contains unallocated slices.

§

Destroy

Destroys the current partition, removing it from the VolumeManager, and freeing all underlying storage. The connection to the volume is also closed.

§

Clone

Fields

§flags: OpenFlags
§object: ServerEnd<NodeMarker>

Create another connection to the same remote object.

flags may be any of:

  • OpenFlags.RIGHT_*
  • OpenFlags.APPEND
  • OpenFlags.DESCRIBE
  • OpenFlags.CLONE_SAME_RIGHTS

All other flags are ignored.

The OpenFlags.RIGHT_* bits in flags request corresponding rights over the resulting cloned object. The cloned object must have rights less than or equal to the original object, otherwise returns ZX_ERR_ACCESS_DENIED. Alternatively, pass OpenFlags.CLONE_SAME_RIGHTS to inherit the rights on the source connection. It is invalid to pass any of the OpenFlags.RIGHT_* flags together with OpenFlags.CLONE_SAME_RIGHTS.

§

GetAttr

Acquires information about the node.

This method does not require any rights.

§

SetAttr

Fields

§flags: NodeAttributeFlags
§attributes: NodeAttributes

Updates information about the node.

This method requires following rights: OpenFlags.RIGHT_WRITABLE, otherwise returns ZX_ERR_BAD_HANDLE.

§

GetFlags

Acquires the Directory.Open rights and flags used to access this file.

This method does not require any rights.

§

SetFlags

Fields

§flags: OpenFlags

Changes the Directory.Open flags used to access the file. Supported flags which can be turned on / off:

  • OpenFlags.APPEND

This method does not require any rights.

§

QueryFilesystem

Query the filesystem for filesystem-specific information.

§

Close

Terminates the connection.

After calling Close, the client must not send any other requests.

Servers, after sending the status response, should close the connection regardless of status and without sending an epitaph.

Closing the client end of the channel should be semantically equivalent to calling Close without knowing when the close has completed or its status.

§

Query

§

Reopen

Fields

§rights_request: Option<Box<RightsRequest>>
§object_request: ServerEnd<NodeMarker>

Creates another connection to the same node.

  • object_request is the server end of a channel created for the new connection. The caller may proceed to send messages on the corresponding client end right away.
§

GetConnectionInfo

Acquires information about the connection.

This method does not require any rights.

§

GetAttributes

Fields

§query: NodeAttributesQuery

Acquires information about the node.

The attributes of a node should be stable, independent of the specific protocol used to access it.

If a particular attribute is not applicable or not supported, filesystems should leave the corresponding field absent.

  • query a bit-mask specifying which attributes to fetch. The server should not return more than necessary.
  • attributes the returned attributes.

This method requires the [Rights.GET_ATTRIBUTES] right.

§

UpdateAttributes

Fields

§payload: MutableNodeAttributes

Updates information about the node.

  • attributes the presence of a table field in attributes indicates the intent to update the corresponding attribute.

This method requires the [Rights.UPDATE_ATTRIBUTES] right.

§

Sync

Synchronizes updates to the node to the underlying media, if it exists.

This method will return when the filesystem server has flushed the relevant updates to the underlying media, but does not guarantee the underlying media has persisted the information, nor that any information is committed to hardware. Clients may use Sync to ensure ordering between operations.

This method does not require any rights.

§

ConnectToDeviceFidl

Fields

§server: Channel

Connect to the underlying device’s FIDL protocol. This connection will not be multiplexed with fuchsia.device.Controller or fuchsia.io.Node.

§

Bind

Fields

§driver: String

Attempt to bind a driver to this device.

  • request driver This represents the suffix of a driver URL (e.g: “fvm.cm”). If this is non-empty, then the only drivers that will try to bind are ones that match this url suffix.
§

Rebind

Unbind all the children of this device, and then attempt to bind a driver to the device. This will not return until the bind completes.

  • request driver This represents the suffix of a driver URL (e.g: “fvm.cm”). If this is non-empty, then the only drivers that will try to bind are ones that match this url suffix.
§

UnbindChildren

This api will unbind all the children of this device synchronously. This will avoid watching for device removal by the clients.

§

ScheduleUnbind

Disconnect this device and allow its parent to be bound again. This may not complete before it returns.

§

GetTopologicalPath

Return the topological path for this device

§

GetMinDriverLogSeverity

Return the current logging flags for this device’s driver

§

SetMinDriverLogSeverity

Fields

§severity: LogLevelFilter

Set the logging flags for this device’s driver.

§

GetCurrentPerformanceState

Gets the current performance state of the device.

§

SetPerformanceState

Fields

§requested_state: u32

Set the performance state of this device to the requested performance state. This is only called for the current device and none of the descendants are aware of the state transition. Returns ZX_OK, if the device is in a working state and the performance state is changed to requested_state successfully. out_state will be same as requested_state. Returns error status, if switching to the requested_state was unsuccessful. out_state is the state that the device is currently in.

Implementations§

source§

impl VolumeAndNodeRequest

source

pub fn into_get_info(self) -> Option<VolumeAndNodeGetInfoResponder>

source

pub fn into_get_stats(self) -> Option<(bool, VolumeAndNodeGetStatsResponder)>

source

pub fn into_open_session( self ) -> Option<(ServerEnd<SessionMarker>, VolumeAndNodeControlHandle)>

source

pub fn into_read_blocks( self ) -> Option<(Vmo, u64, u64, u64, VolumeAndNodeReadBlocksResponder)>

source

pub fn into_write_blocks( self ) -> Option<(Vmo, u64, u64, u64, VolumeAndNodeWriteBlocksResponder)>

source

pub fn into_get_type_guid(self) -> Option<VolumeAndNodeGetTypeGuidResponder>

source

pub fn into_get_instance_guid( self ) -> Option<VolumeAndNodeGetInstanceGuidResponder>

source

pub fn into_get_name(self) -> Option<VolumeAndNodeGetNameResponder>

source

pub fn into_query_slices( self ) -> Option<(Vec<u64>, VolumeAndNodeQuerySlicesResponder)>

source

pub fn into_get_volume_info(self) -> Option<VolumeAndNodeGetVolumeInfoResponder>

source

pub fn into_extend(self) -> Option<(u64, u64, VolumeAndNodeExtendResponder)>

source

pub fn into_shrink(self) -> Option<(u64, u64, VolumeAndNodeShrinkResponder)>

source

pub fn into_destroy(self) -> Option<VolumeAndNodeDestroyResponder>

source

pub fn into_clone( self ) -> Option<(OpenFlags, ServerEnd<NodeMarker>, VolumeAndNodeControlHandle)>

source

pub fn into_get_attr(self) -> Option<VolumeAndNodeGetAttrResponder>

source

pub fn into_set_attr( self ) -> Option<(NodeAttributeFlags, NodeAttributes, VolumeAndNodeSetAttrResponder)>

source

pub fn into_get_flags(self) -> Option<VolumeAndNodeGetFlagsResponder>

source

pub fn into_set_flags( self ) -> Option<(OpenFlags, VolumeAndNodeSetFlagsResponder)>

source

pub fn into_query_filesystem( self ) -> Option<VolumeAndNodeQueryFilesystemResponder>

source

pub fn into_close(self) -> Option<VolumeAndNodeCloseResponder>

source

pub fn into_query(self) -> Option<VolumeAndNodeQueryResponder>

source

pub fn into_reopen( self ) -> Option<(Option<Box<RightsRequest>>, ServerEnd<NodeMarker>, VolumeAndNodeControlHandle)>

source

pub fn into_get_connection_info( self ) -> Option<VolumeAndNodeGetConnectionInfoResponder>

source

pub fn into_get_attributes( self ) -> Option<(NodeAttributesQuery, VolumeAndNodeGetAttributesResponder)>

source

pub fn into_update_attributes( self ) -> Option<(MutableNodeAttributes, VolumeAndNodeUpdateAttributesResponder)>

source

pub fn into_sync(self) -> Option<VolumeAndNodeSyncResponder>

source

pub fn into_connect_to_device_fidl( self ) -> Option<(Channel, VolumeAndNodeControlHandle)>

source

pub fn into_bind(self) -> Option<(String, VolumeAndNodeBindResponder)>

source

pub fn into_rebind(self) -> Option<(String, VolumeAndNodeRebindResponder)>

source

pub fn into_unbind_children( self ) -> Option<VolumeAndNodeUnbindChildrenResponder>

source

pub fn into_schedule_unbind( self ) -> Option<VolumeAndNodeScheduleUnbindResponder>

source

pub fn into_get_topological_path( self ) -> Option<VolumeAndNodeGetTopologicalPathResponder>

source

pub fn into_get_min_driver_log_severity( self ) -> Option<VolumeAndNodeGetMinDriverLogSeverityResponder>

source

pub fn into_set_min_driver_log_severity( self ) -> Option<(LogLevelFilter, VolumeAndNodeSetMinDriverLogSeverityResponder)>

source

pub fn into_get_current_performance_state( self ) -> Option<VolumeAndNodeGetCurrentPerformanceStateResponder>

source

pub fn into_set_performance_state( self ) -> Option<(u32, VolumeAndNodeSetPerformanceStateResponder)>

source

pub fn method_name(&self) -> &'static str

Name of the method defined in FIDL

Trait Implementations§

source§

impl Debug for VolumeAndNodeRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Encode<Ambiguous1> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T> Encode<Ambiguous2> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more