pub enum VolumeRequest {
GetInfo {
responder: VolumeGetInfoResponder,
},
GetStats {
clear: bool,
responder: VolumeGetStatsResponder,
},
OpenSession {
session: ServerEnd<SessionMarker>,
control_handle: VolumeControlHandle,
},
GetTypeGuid {
responder: VolumeGetTypeGuidResponder,
},
GetInstanceGuid {
responder: VolumeGetInstanceGuidResponder,
},
GetName {
responder: VolumeGetNameResponder,
},
GetMetadata {
responder: VolumeGetMetadataResponder,
},
QuerySlices {
start_slices: Vec<u64>,
responder: VolumeQuerySlicesResponder,
},
GetVolumeInfo {
responder: VolumeGetVolumeInfoResponder,
},
Extend {
start_slice: u64,
slice_count: u64,
responder: VolumeExtendResponder,
},
Shrink {
start_slice: u64,
slice_count: u64,
responder: VolumeShrinkResponder,
},
Destroy {
responder: VolumeDestroyResponder,
},
}
Expand description
Volume is a partition which may access virtually-mapped blocks within a device.
Variants§
GetInfo
Get information about the underlying block device.
Fields
responder: VolumeGetInfoResponder
GetStats
Returns stats about block device operations. Setting clear
will reset stats counters.
OpenSession
Opens a new FIFO-based session on the block device.
GetTypeGuid
Gets the type GUID of the partition (if one exists). If the partition has no type GUID, ZX_ERR_NOT_SUPPORTED is returned.
Fields
responder: VolumeGetTypeGuidResponder
GetInstanceGuid
Gets the instance GUID of the partition (if one exists). If the partition has no instance GUID, ZX_ERR_NOT_SUPPORTED is returned.
Fields
responder: VolumeGetInstanceGuidResponder
GetName
Gets the name of the partition (if one exists). If the partition has no name, ZX_ERR_NOT_SUPPORTED is returned.
Fields
responder: VolumeGetNameResponder
GetMetadata
Gets the metadata for the partition.
Fields may be absent if the partition doesn’t have the given metadata.
Fields
responder: VolumeGetMetadataResponder
QuerySlices
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.
Fields
responder: VolumeGetVolumeInfoResponder
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
Destroys the current partition, removing it from the VolumeManager, and freeing all underlying storage. The connection to the volume is also closed.
Fields
responder: VolumeDestroyResponder
Implementations§
Source§impl VolumeRequest
impl VolumeRequest
pub fn into_get_info(self) -> Option<VolumeGetInfoResponder>
pub fn into_get_stats(self) -> Option<(bool, VolumeGetStatsResponder)>
pub fn into_open_session( self, ) -> Option<(ServerEnd<SessionMarker>, VolumeControlHandle)>
pub fn into_get_type_guid(self) -> Option<VolumeGetTypeGuidResponder>
pub fn into_get_instance_guid(self) -> Option<VolumeGetInstanceGuidResponder>
pub fn into_get_name(self) -> Option<VolumeGetNameResponder>
pub fn into_get_metadata(self) -> Option<VolumeGetMetadataResponder>
pub fn into_query_slices(self) -> Option<(Vec<u64>, VolumeQuerySlicesResponder)>
pub fn into_get_volume_info(self) -> Option<VolumeGetVolumeInfoResponder>
pub fn into_extend(self) -> Option<(u64, u64, VolumeExtendResponder)>
pub fn into_shrink(self) -> Option<(u64, u64, VolumeShrinkResponder)>
pub fn into_destroy(self) -> Option<VolumeDestroyResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL