Quiesce read-ahead before thermal spin-down

This commit is contained in:
Andrea Mazzoleni 2026-08-17 19:33:26 +02:00
parent d9091ba551
commit bde6c8b125
5 changed files with 74 additions and 8 deletions

View file

@ -5872,9 +5872,9 @@ void generate_configuration(const char* path)
/**
* Flush and sync the parity files.
* Flush all pending I/O and sync the parity files.
*/
int state_flush(struct snapraid_state* state, struct snapraid_io* io, struct snapraid_parity_handle* parity_handle, block_off_t blockcur)
int state_barrier(struct snapraid_state* state, struct snapraid_io* io, struct snapraid_parity_handle* parity_handle, block_off_t blockcur)
{
unsigned l;
@ -5904,6 +5904,10 @@ int state_flush(struct snapraid_state* state, struct snapraid_io* io, struct sna
}
}
/* complete all read-ahead without consuming the results */
if (io)
io_quiesce(io);
return 0;
}