Use a single scheduling point for sync

This commit is contained in:
Andrea Mazzoleni 2016-01-31 18:55:09 +01:00
parent d2bad33af8
commit 541665db46
3 changed files with 56 additions and 3 deletions

View file

@ -365,6 +365,14 @@ void io_parity_write(struct snapraid_io* io, unsigned* levcur, unsigned* waiting
*/
void io_write_next(struct snapraid_io* io, block_off_t blockcur, int skip, int* writer_error);
/**
* Next write and read position.
*
* It's a combination of io_write_next() and io_read_next() that
* locks only one time the scheduling mutex.
*/
block_off_t io_write_and_read_next(struct snapraid_io* io, block_off_t blockcur, int skip, int* writer_error, void*** buffer);
/**
* Refresh the number of cached blocks for all data and parity disks.
*/