//! The volume-manager protocol (docs/file-system-development/storage-architecture.md): //! what a filesystem service says to the volume manager over //! `/protocol/volume-manager`. Defined through the envelope, so every packet //! begins with the folded `Header`. //! //! One verb. A filesystem the volume manager spawned announces itself with the //! volume id it was given as argv[1] (folded into `Header.target`); the reply //! carries that volume's block channel — already range-confined to the //! filesystem's badge — as the call's returned capability. The filesystem never //! finds its storage by name and never sees the whole device; establishment is //! by lineage, exactly as a driver reaches its controller (communication.md //! "Establishment: two planes"). No channel in the reply means the volume is not //! ready yet — retryable, never a verdict. const envelope = @import("envelope"); pub const version: u16 = 1; /// The filesystem's handshake. Carries only its protocol version; the volume it /// serves is `Header.target`, and the block channel it needs comes back as the /// reply's capability. pub const Hello = extern struct { version: u16 = version, _padding: u16 = 0, }; pub const Protocol = envelope.Define(.{ .name = "volume-manager", .version = 1, .operations = &.{ .{ .name = "hello", .request = Hello }, }, }); pub const Operation = Protocol.Operation; pub const message_maximum: usize = Protocol.message_maximum;