mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 23:16:28 -05:00
Track deallocated files in the content file for parity recovery
Add a new 'dealloc' list per disk to record files that were removed or modified during a scan. This list is saved in the content file (new format version SNAPCNT4) so that past parity contributions of those files can be imported from previous snapshots.
This commit is contained in:
parent
cebc9b62f2
commit
1aae44a2a3
9 changed files with 417 additions and 10 deletions
|
|
@ -35,6 +35,7 @@ struct snapraid_import_file {
|
|||
struct snapraid_import_block* blockimp; /**< All the blocks of the file. */
|
||||
block_off_t blockmax; /**< Number of blocks. */
|
||||
char* path; /**< Full path of the file. */
|
||||
int is_runtime; /**< If the hash was obtained at runtime */
|
||||
|
||||
/* nodes for data structures */
|
||||
tommy_node nodelist;
|
||||
|
|
@ -56,5 +57,10 @@ int state_import_fetch(struct snapraid_state* state, int prevhash, struct snapra
|
|||
*/
|
||||
void state_import(struct snapraid_state* state, const char* dir);
|
||||
|
||||
/**
|
||||
* Import files from the dealloc list.
|
||||
*/
|
||||
void state_dealloc(struct snapraid_state* state, const char* dir, tommy_list* dealloclist);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue