mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-01 12:26:38 -05:00
Initial RAID6 support. Not yet complete.
Uses Murmur3 as default hash. Check now returns and error even if only recoverable errors are present.
This commit is contained in:
parent
ad70b7e560
commit
08831c6641
24 changed files with 1624 additions and 394 deletions
10
state.h
10
state.h
|
|
@ -26,14 +26,22 @@
|
|||
*/
|
||||
extern volatile int global_interrupt;
|
||||
|
||||
#define HASH_MURMUR3 0
|
||||
#define HASH_MD5 1
|
||||
|
||||
struct snapraid_state {
|
||||
int verbose; /**< Verbose output. */
|
||||
int force_zero; /**< Forced dangerous operations of synching file now with zero size. */
|
||||
int force_empty; /**< Forced dangerous operations of synching disk now empty. */
|
||||
int expect_unrecoverable; /**< Expect presence of unrecoverable error in checking or fixing. */
|
||||
int expect_recoverable; /**< Expect presence of recoverable error in checking. */
|
||||
int need_write; /**< If the state is changed. */
|
||||
uint32_t block_size; /**< Block size in bytes. */
|
||||
char content[PATH_MAX]; /**< Path of the content file. */
|
||||
char parity[PATH_MAX]; /**< Path of the parity file. */
|
||||
char qarity[PATH_MAX]; /**< Path of the qarity file. */
|
||||
unsigned level; /**< Number of parity levels. 1 for RAID5, 2 for RAID6. */
|
||||
unsigned hash; /**< Hash kind used. */
|
||||
tommy_array diskarr; /**< Disk array. */
|
||||
tommy_list excludelist; /**< List of exclusion. */
|
||||
};
|
||||
|
|
@ -51,7 +59,7 @@ void state_done(struct snapraid_state* state);
|
|||
/**
|
||||
* Read the configuration file.
|
||||
*/
|
||||
void state_config(struct snapraid_state* state, const char* path, int verbose, int force_zero, int force_empty);
|
||||
void state_config(struct snapraid_state* state, const char* path, int verbose, int force_zero, int force_empty, int expect_unrecoverable, int expect_recoverable);
|
||||
|
||||
/**
|
||||
* Read the state.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue