Ian McKellar would like Owners Override to review this change authored by James Sullivan.
[block] Move to fuchsia.storage.block.Block
Currently, there are three FIDL protocols related to block devices:
- fuchsia.hardware.block.Block
- fuchsia.hardware.block.partition.Partition
- fuchsia.hardware.block.volume.Volume
Although they are separate, they are in fact essentially all the same
thing: Volume composes Partition which composes Block (so Volume
contains both), and all servers handle Volume. So in practice, any
Block is also a Volume and vice versa.
This is confusing, so that's the first goal: Collapse all of these into
a single Block protocol. The following changes were involved with this:
- Define fuchsia.storage.block.Block as a drop-in replacement for
fuchsia.hardware.block.volume.Volume.
- Delete fuchsia.hardware.block.Block and
fuchsia.hardware.block.partition.Partition.
(Note that we can't delete //sdk/fidl/fuchsia.hardware.block yet,
because it also has an Ftl protool, although that is never used in
practice and so I've marked that with a TODO for now.)
A secondary goal is to make it clearer that Block is not specifically a
driver-related protocol (which is what fuchsia.hardware.* implies).
This other point can be seen with the
fuchsia.hardware.block.volume.Service service, which is only exposed by
Driver Framework drivers; everything else on the system deals with the
Volume protocol itself, and there are numerous non-Driver components
which expose the Volume protocol (e.g. the GPT component which exposes
one per partition).
For this other goal, we make the following changes:
- Fully decouple fuchsia.hardware.block.driver from
fuchsia.storage.block. This required re-defining some types.
- Keep fuchsia.hardware.block.volume.Service where it is (which
expresses that it is Driver-specific, and allows us to add other
Driver-specific things there as needed), and have that service expose
the fuchsia.storage.block.Block protocol.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |