mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Removes too verbose printing in check/fix.
This commit is contained in:
parent
185d3a4a18
commit
15d9bb4db2
4 changed files with 36 additions and 9 deletions
|
|
@ -496,7 +496,6 @@ endif
|
|||
$(TESTENV) ./mktest$(EXEEXT) append 4 500 test/disk3/_b/_a/*
|
||||
$(TESTENV) ./mktest$(EXEEXT) truncate 4 500 test/disk2/_b/_b/*
|
||||
$(TESTENV) ./mktest$(EXEEXT) truncate 4 500 test/disk3/_b/_b/*
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-expect-recoverable -c $(RAID5) -a check -l test.log
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-expect-recoverable -c $(RAID6) -a check -l test.log
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-expect-unrecoverable -c $(RAID5) check -l test.log
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-expect-recoverable -c $(RAID6) check -l test.log
|
||||
|
|
|
|||
32
check.c
32
check.c
|
|
@ -1002,7 +1002,9 @@ static int state_check_process(struct snapraid_state* state, int check, int fix,
|
|||
}
|
||||
|
||||
fprintf(stdlog, "status:unrecoverable:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
printf("unrecoverable %s\n", path);
|
||||
if (state->opt.verbose) {
|
||||
printf("unrecoverable %s\n", path);
|
||||
}
|
||||
|
||||
/* and do not set the time if damaged */
|
||||
continue;
|
||||
|
|
@ -1015,7 +1017,9 @@ static int state_check_process(struct snapraid_state* state, int check, int fix,
|
|||
}
|
||||
|
||||
fprintf(stdlog, "status:recovered:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
printf("recovered %s\n", path);
|
||||
if (state->opt.verbose) {
|
||||
printf("recovered %s\n", path);
|
||||
}
|
||||
|
||||
inode = handle[j].st.st_ino;
|
||||
|
||||
|
|
@ -1055,14 +1059,20 @@ static int state_check_process(struct snapraid_state* state, int check, int fix,
|
|||
if (file_flag_has(file, FILE_IS_DAMAGED)) {
|
||||
if (!check) {
|
||||
fprintf(stdlog, "status:damaged:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
printf("damaged %s\n", path);
|
||||
if (state->opt.verbose) {
|
||||
printf("damaged %s\n", path);
|
||||
}
|
||||
} else {
|
||||
fprintf(stdlog, "status:unrecoverable:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
printf("unrecoverable %s\n", path);
|
||||
if (state->opt.verbose) {
|
||||
printf("unrecoverable %s\n", path);
|
||||
}
|
||||
}
|
||||
} else if (file_flag_has(file, FILE_IS_FIXED)) {
|
||||
fprintf(stdlog, "status:recoverable:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
printf("recoverable %s\n", path);
|
||||
if (state->opt.verbose) {
|
||||
printf("recoverable %s\n", path);
|
||||
}
|
||||
} else {
|
||||
fprintf(stdlog, "status:correct:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
if (state->opt.verbose) {
|
||||
|
|
@ -1195,7 +1205,9 @@ close_and_continue:
|
|||
++recovered_error;
|
||||
|
||||
fprintf(stdlog, "status:recovered:%s:%s\n", disk->name, file->sub);
|
||||
printf("recovered %s%s\n", disk->dir, file->sub);
|
||||
if (state->opt.verbose) {
|
||||
printf("recovered %s%s\n", disk->dir, file->sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1358,7 +1370,9 @@ close_and_continue:
|
|||
}
|
||||
|
||||
fprintf(stdlog, "status:recovered:%s:%s\n", disk->name, link->sub);
|
||||
printf("recovered %s%s\n", disk->dir, link->sub);
|
||||
if (state->opt.verbose) {
|
||||
printf("recovered %s%s\n", disk->dir, link->sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1424,7 +1438,9 @@ close_and_continue:
|
|||
++recovered_error;
|
||||
|
||||
fprintf(stdlog, "status:recovered:%s:%s\n", disk->name, dir->sub);
|
||||
printf("recovered %s%s\n", disk->dir, dir->sub);
|
||||
if (state->opt.verbose) {
|
||||
printf("recovered %s%s\n", disk->dir, dir->sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -506,6 +506,9 @@ if the error is a recoverable one or not.
|
|||
If you use the \(hya, \(hy\(hyaudit\(hyonly option, only the file
|
||||
data is checked, and the redundandy data is ignored.
|
||||
.PP
|
||||
If you specify \(hyv, \(hy\(hyverbose it prints the list of recoverable
|
||||
files.
|
||||
.PP
|
||||
Files are identified by path, and checked by content.
|
||||
.PP
|
||||
Nothing is modified.
|
||||
|
|
@ -520,6 +523,9 @@ update the new state of the files.
|
|||
All the files that cannot be fixed are renamed adding
|
||||
the \(a".unrecoverable\(a" extension.
|
||||
.PP
|
||||
If you specify \(hyv, \(hy\(hyverbose it prints the list of recovered
|
||||
files.
|
||||
.PP
|
||||
The \(a"content\(a" file is NOT modified.
|
||||
The \(a"parity\(a" files are modified if necessary.
|
||||
The files in the array are modified if necessary.
|
||||
|
|
|
|||
|
|
@ -287,6 +287,9 @@ Commands
|
|||
If you use the -a, --audit-only option, only the file
|
||||
data is checked, and the redundandy data is ignored.
|
||||
|
||||
If you specify -v, --verbose it prints the list of recoverable
|
||||
files.
|
||||
|
||||
Files are identified by path, and checked by content.
|
||||
|
||||
Nothing is modified.
|
||||
|
|
@ -302,6 +305,9 @@ Commands
|
|||
All the files that cannot be fixed are renamed adding
|
||||
the ".unrecoverable" extension.
|
||||
|
||||
If you specify -v, --verbose it prints the list of recovered
|
||||
files.
|
||||
|
||||
The "content" file is NOT modified.
|
||||
The "parity" files are modified if necessary.
|
||||
The files in the array are modified if necessary.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue