Fix touch abort before the first sync when no content file exists

This commit is contained in:
Andrea Mazzoleni 2026-10-18 10:45:14 +02:00
parent 20e081d5ac
commit a0d6bc288a
3 changed files with 56 additions and 1 deletions

View file

@ -240,6 +240,16 @@ void state_probe(struct snapraid_state* state);
*/
void state_read(struct snapraid_state* state);
/**
* Check if all configured parity splits have persistent sizes.
*/
int state_is_write_ready(struct snapraid_state* state);
/**
* Require initialized parity split sizes before commands that can save content.
*/
void state_require_write_ready(struct snapraid_state* state);
/**
* Count the number of unsynced parity positions using an event sweep across extents.
* Counts positions in [blockmin, blockmax). The caller must ensure that the disk list,