Add an extensive parity filesystem check

With the new mapping it's now possible to check everything
in a very fast way.
This commit is contained in:
Andrea Mazzoleni 2015-10-05 21:40:44 +02:00
parent 74ca71600d
commit b17e618d49
6 changed files with 260 additions and 39 deletions

View file

@ -317,6 +317,9 @@ static void scan_file_deallocate(struct snapraid_scan* scan, struct snapraid_fil
block_state_set(block, BLOCK_STATE_DELETED);
}
/* mark the file as deleted */
file_flag_set(file, FILE_IS_DELETED);
/* insert it in the list of deleted blocks */
tommy_list_insert_tail(&disk->deletedlist, &file->nodelist, file);
}
@ -1772,6 +1775,9 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
tommy_list_foreach(&scanlist, (tommy_foreach_func*)free);
/* check the filesystem on all disks */
state_fscheck(state, "after scan");
if (is_diff) {
/* check for file difference */
if (!no_difference)