mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 05:40:14 -05:00
Add regression test for multi parity
This commit is contained in:
parent
0fba4722c0
commit
bec310d50b
18 changed files with 91 additions and 65 deletions
|
|
@ -35,6 +35,12 @@ struct snapraid_split_handle {
|
|||
* Note that this value CANNOT be PARITY_SIZE_INVALID.
|
||||
*/
|
||||
uint64_t size;
|
||||
|
||||
/**
|
||||
* Artificial size limit for testing.
|
||||
* 0 means unlimited.
|
||||
*/
|
||||
uint64_t limit_size;
|
||||
};
|
||||
|
||||
struct snapraid_parity_handle {
|
||||
|
|
@ -78,12 +84,11 @@ int parity_is_invalid(struct snapraid_state* state);
|
|||
*/
|
||||
void parity_overflow(struct snapraid_state* state, data_off_t size);
|
||||
|
||||
|
||||
/**
|
||||
* Create the parity file.
|
||||
* \param out_size Return the size of the parity file.
|
||||
*/
|
||||
int parity_create(struct snapraid_parity_handle* handle, const struct snapraid_parity* parity, unsigned level, int mode);
|
||||
int parity_create(struct snapraid_parity_handle* handle, const struct snapraid_parity* parity, unsigned level, int mode, uint64_t limit_size);
|
||||
|
||||
/**
|
||||
* Change the parity size.
|
||||
|
|
@ -101,7 +106,7 @@ void parity_size(struct snapraid_parity_handle* handle, data_off_t* out_size);
|
|||
/**
|
||||
* Open an already existing parity file.
|
||||
*/
|
||||
int parity_open(struct snapraid_parity_handle* handle, const struct snapraid_parity* parity, unsigned level, int mode);
|
||||
int parity_open(struct snapraid_parity_handle* handle, const struct snapraid_parity* parity, unsigned level, int mode, uint64_t limit_size);
|
||||
|
||||
/**
|
||||
* Flush the parity file in the disk.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue