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
Fields
responder: VolumeAndNodeGetInfoResponder
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
Opens a new FIFO-based session on the block device.
ReadBlocks
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
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
Fields
responder: VolumeAndNodeGetTypeGuidResponder
Gets the type GUID of the partition (if one exists). If the partition has no type GUID, ZX_ERR_NOT_SUPPORTED is returned.
GetInstanceGuid
Fields
responder: VolumeAndNodeGetInstanceGuidResponder
Gets the instance GUID of the partition (if one exists). If the partition has no instance GUID, ZX_ERR_NOT_SUPPORTED is returned.
GetName
Fields
responder: VolumeAndNodeGetNameResponder
Gets the name of the partition (if one exists). If the partition has no name, ZX_ERR_NOT_SUPPORTED is returned.
QuerySlices
Returns the number of contiguous allocated (or unallocated) vslices starting from each vslice.
GetVolumeInfo
Fields
responder: VolumeAndNodeGetVolumeInfoResponder
Returns the information about this volume and the volume manager it is embedded in.
Extend
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
Shrinks a virtual partition. Returns ZX_OK
if ANY slices are
freed, even if part of the requested range contains unallocated slices.
Destroy
Fields
responder: VolumeAndNodeDestroyResponder
Destroys the current partition, removing it from the VolumeManager, and freeing all underlying storage. The connection to the volume is also closed.
Clone
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
Fields
responder: VolumeAndNodeGetAttrResponder
Acquires information about the node.
This method does not require any rights.
SetAttr
Fields
flags: NodeAttributeFlags
attributes: NodeAttributes
responder: VolumeAndNodeSetAttrResponder
Updates information about the node.
This method requires following rights: OpenFlags.RIGHT_WRITABLE
, otherwise returns
ZX_ERR_BAD_HANDLE
.
GetFlags
Fields
responder: VolumeAndNodeGetFlagsResponder
Acquires the Directory.Open
rights and flags used to access this file.
This method does not require any rights.
SetFlags
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
Fields
responder: VolumeAndNodeQueryFilesystemResponder
Query the filesystem for filesystem-specific information.
Close
Fields
responder: VolumeAndNodeCloseResponder
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
Fields
responder: VolumeAndNodeQueryResponder
Reopen
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
Fields
responder: VolumeAndNodeGetConnectionInfoResponder
Acquires information about the connection.
This method does not require any rights.
GetAttributes
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
Updates information about the node.
attributes
the presence of a table field inattributes
indicates the intent to update the corresponding attribute.
This method requires the [Rights.UPDATE_ATTRIBUTES
] right.
Sync
Fields
responder: VolumeAndNodeSyncResponder
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
Connect to the underlying device’s FIDL protocol. This connection will not be multiplexed with fuchsia.device.Controller or fuchsia.io.Node.
Bind
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
Fields
responder: VolumeAndNodeUnbindChildrenResponder
This api will unbind all the children of this device synchronously. This will avoid watching for device removal by the clients.
ScheduleUnbind
Fields
responder: VolumeAndNodeScheduleUnbindResponder
Disconnect this device and allow its parent to be bound again. This may not complete before it returns.
GetTopologicalPath
Fields
responder: VolumeAndNodeGetTopologicalPathResponder
Return the topological path for this device
GetMinDriverLogSeverity
Fields
Return the current logging flags for this device’s driver
SetMinDriverLogSeverity
Set the logging flags for this device’s driver.
GetCurrentPerformanceState
Fields
Gets the current performance state of the device.
SetPerformanceState
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
impl VolumeAndNodeRequest
pub fn into_get_info(self) -> Option<VolumeAndNodeGetInfoResponder>
pub fn into_get_stats(self) -> Option<(bool, VolumeAndNodeGetStatsResponder)>
pub fn into_open_session( self ) -> Option<(ServerEnd<SessionMarker>, VolumeAndNodeControlHandle)>
pub fn into_read_blocks( self ) -> Option<(Vmo, u64, u64, u64, VolumeAndNodeReadBlocksResponder)>
pub fn into_write_blocks( self ) -> Option<(Vmo, u64, u64, u64, VolumeAndNodeWriteBlocksResponder)>
pub fn into_get_type_guid(self) -> Option<VolumeAndNodeGetTypeGuidResponder>
pub fn into_get_instance_guid( self ) -> Option<VolumeAndNodeGetInstanceGuidResponder>
pub fn into_get_name(self) -> Option<VolumeAndNodeGetNameResponder>
pub fn into_query_slices( self ) -> Option<(Vec<u64>, VolumeAndNodeQuerySlicesResponder)>
pub fn into_get_volume_info(self) -> Option<VolumeAndNodeGetVolumeInfoResponder>
pub fn into_extend(self) -> Option<(u64, u64, VolumeAndNodeExtendResponder)>
pub fn into_shrink(self) -> Option<(u64, u64, VolumeAndNodeShrinkResponder)>
pub fn into_destroy(self) -> Option<VolumeAndNodeDestroyResponder>
pub fn into_clone( self ) -> Option<(OpenFlags, ServerEnd<NodeMarker>, VolumeAndNodeControlHandle)>
pub fn into_get_attr(self) -> Option<VolumeAndNodeGetAttrResponder>
pub fn into_set_attr( self ) -> Option<(NodeAttributeFlags, NodeAttributes, VolumeAndNodeSetAttrResponder)>
pub fn into_get_flags(self) -> Option<VolumeAndNodeGetFlagsResponder>
pub fn into_set_flags( self ) -> Option<(OpenFlags, VolumeAndNodeSetFlagsResponder)>
pub fn into_query_filesystem( self ) -> Option<VolumeAndNodeQueryFilesystemResponder>
pub fn into_close(self) -> Option<VolumeAndNodeCloseResponder>
pub fn into_query(self) -> Option<VolumeAndNodeQueryResponder>
pub fn into_reopen( self ) -> Option<(Option<Box<RightsRequest>>, ServerEnd<NodeMarker>, VolumeAndNodeControlHandle)>
pub fn into_get_connection_info( self ) -> Option<VolumeAndNodeGetConnectionInfoResponder>
pub fn into_get_attributes( self ) -> Option<(NodeAttributesQuery, VolumeAndNodeGetAttributesResponder)>
pub fn into_update_attributes( self ) -> Option<(MutableNodeAttributes, VolumeAndNodeUpdateAttributesResponder)>
pub fn into_sync(self) -> Option<VolumeAndNodeSyncResponder>
pub fn into_connect_to_device_fidl( self ) -> Option<(Channel, VolumeAndNodeControlHandle)>
pub fn into_bind(self) -> Option<(String, VolumeAndNodeBindResponder)>
pub fn into_rebind(self) -> Option<(String, VolumeAndNodeRebindResponder)>
pub fn into_unbind_children( self ) -> Option<VolumeAndNodeUnbindChildrenResponder>
pub fn into_schedule_unbind( self ) -> Option<VolumeAndNodeScheduleUnbindResponder>
pub fn into_get_topological_path( self ) -> Option<VolumeAndNodeGetTopologicalPathResponder>
pub fn into_get_min_driver_log_severity( self ) -> Option<VolumeAndNodeGetMinDriverLogSeverityResponder>
pub fn into_set_min_driver_log_severity( self ) -> Option<(LogLevelFilter, VolumeAndNodeSetMinDriverLogSeverityResponder)>
pub fn into_get_current_performance_state( self ) -> Option<VolumeAndNodeGetCurrentPerformanceStateResponder>
pub fn into_set_performance_state( self ) -> Option<(u32, VolumeAndNodeSetPerformanceStateResponder)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL