Skip to main content

Module subvolume_error

Module subvolume_error 

Source
Expand description

The failure type of the subvolume migration and its simulated-kill hook. What: The failure type of the subvolume migration and the test hook that simulates a kill. Why: Every step names what it did to which path and why it stopped, so the report can tell the person the cause, the state the journal holds, and the way forward. The interrupt hook stops a run at a named point exactly as a kill would (all state is on disk or in the journal; nothing else survives a kill), so the resume controls can stop at every journal step without killing the test process. Release code passes Interrupt::never().

In TS you’d write (pseudocode):

class MigrateError extends Error {}
const interrupt = { point: undefined as string | undefined, after: 0 }; // tests only

Structs§

Interrupt
What: The simulated kill: stop the run after a named point has been reached a number of times. Cell<u64> is a number that can change behind a shared borrow (TS has no distinction; everything mutates). Why: A control sets the point, runs, sees the Interrupted error, and runs again with Interrupt::never().

Enums§

MigrateError
What: Why a migration step stopped. String is owned text; PathBuf is an owned path. Why: Each variant has its own wording and its own remedy in the report.