1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// SPDX-License-Identifier: MIT OR Apache-2.0
//! The `BlockRead` seam — how `lamzfs` reads one pool member (one leaf device /
//! partition) — and the `PoolMember` bundle handed to [`crate::Zfs::import`].
use crateError;
/// Block-level reads for ONE leaf device of a pool. Identical in shape to
/// `lambutter::BlockRead` / `lamxfs::BlockRead`, so a consumer that already
/// provides one needs only a one-line adapter.
///
/// A pool may span several members (a mirror, a raidz1 group); the caller hands
/// each as a separate `BlockRead` in a [`PoolMember`], and `lamzfs` reads each
/// member's label to assemble the topology — the caller does not need to know
/// vdev GUIDs in advance.
/// One pool member handed to [`crate::Zfs::import`]: a reader plus the byte
/// length of that partition (accepted for device-bounds parity / future checks).
/// Fill `buf` from `reader` at `offset`, mapping any device failure to a typed
/// [`Error::Io`] carrying the stable `token` and the leaf `vdev` GUID (0 before
/// the topology is known, e.g. during the initial label scan). The one place an
/// `R::Error` is dropped, at the `lamzfs` boundary.
pub