Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Still more updates to support Volume layer activities. (#1508)
Two new structs to describe a Volume: pub struct VolumeInfo { pub block_size: u64, pub volumes: Vec<SubVolumeInfo>, } pub struct SubVolumeInfo { pub blocks_per_extent: u64, pub extent_count: u32, } Added a new method to the `Volume` type that will gather extent info from each sub-volume and return a `VolumeInfo` struct that describes the whole volume. In the `BlockIO` trait, replaced `query_extent_size` with `query_extent_info`. Objects that support this call will return the `RegionExtentInfo` type filled out. Things that do not will just return `None`. Updated crutest's `RegionInfo` struct to have a `VolumeInfo` field. Updated the fill_sparse and span crutest tests to perform their work on all sub-volumes. print_region_description looks like this: ---------------------------------------------- random read with 4 KiB chunks (1 block) region info: block size: 4096 bytes sub_volume 0 blocks / extent: 100 sub_volume 0 extent count: 15 sub_volume 0 extent size: 400 KiB sub_volume 1 blocks / extent: 100 sub_volume 1 extent count: 15 sub_volume 1 extent size: 400 KiB total blocks: 3000 total size: 11.7 MiB encryption: no ---------------------------------------------- Added fill-sparse test to crutest cli Coming in a follow up PR I would like to rename `RegionInfo` in crutest to be `DiskInfo`. This would just be name changes, no functional changes. I decided to break that out to reduce review overhead. --------- Co-authored-by: Alan Hanson <alan@oxide.computer>
- Loading branch information