extentAllocationStats builds an ExtentAllocationStats from a slice of uint32s.
(us []uint32)
| 197 | |
| 198 | // extentAllocationStats builds an ExtentAllocationStats from a slice of uint32s. |
| 199 | func extentAllocationStats(us []uint32) (ExtentAllocationStats, error) { |
| 200 | if l := len(us); l != 4 { |
| 201 | return ExtentAllocationStats{}, fmt.Errorf("incorrect number of values for XFS extent allocation stats: %d", l) |
| 202 | } |
| 203 | |
| 204 | return ExtentAllocationStats{ |
| 205 | ExtentsAllocated: us[0], |
| 206 | BlocksAllocated: us[1], |
| 207 | ExtentsFreed: us[2], |
| 208 | BlocksFreed: us[3], |
| 209 | }, nil |
| 210 | } |
| 211 | |
| 212 | // btreeStats builds a BTreeStats from a slice of uint32s. |
| 213 | func btreeStats(us []uint32) (BTreeStats, error) { |
no outgoing calls
no test coverage detected
searching dependent graphs…