// Package btrfs reads btrfs filesystem state from sysfs.package btrfs// Filesystem is a mounted btrfs filesystem read from /sys/fs/btrfs/<uuid>.type Filesystem struct {UUID string // stable filesystem UUID from sysfsMountID string // kernel filesystem identity for matching monitored mountsIODevice string // sole member block-device name, empty for multi-device/unknown poolsName string // label, else first mountpoint, else UUIDSize uint64 // effective usable capacity, or raw member capacity when RawRaw bool // capacity and usage are physical bytes, unsuitable for disk alertsAlloc uint64 // raw bytes allocated to data, metadata and system chunksHealth string // ONLINE, or DEGRADED when a device is missingNRead uint64 // cumulative bytes read across member devicesNWrite uint64 // cumulative bytes written across member devicesDevices []Device}// Device is one member device (devinfo/<devid>) with its error counters.type Device struct {Name string // "devid N"; sysfs does not expose the block device pathState string // ONLINE or MISSINGReadErrs uint64WriteErrs uint64CorruptionErrs uint64}