mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
Merge branch 'master' into tripleparity
Conflicts: Makefile.am check.c dry.c scrub.c state.c
This commit is contained in:
commit
28297c52d9
4 changed files with 21 additions and 19 deletions
|
|
@ -127,7 +127,9 @@ endif
|
|||
echo --- Create some files, sync and check in RAID5/6/TP
|
||||
$(TESTENV) ./mktest$(EXEEXT) generate 1 4 $(CHECKCOUNT) $(CHECKSIZE)
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -v -c $(CONF) diff > test.log
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -v -c $(CONF) diff -G > test.log
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -v -c $(CONF) dup
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -v -c $(CONF) dup -G
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-force-order-physical sync
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) status
|
||||
if HAVE_SYMLINK
|
||||
|
|
|
|||
6
check.c
6
check.c
|
|
@ -175,7 +175,7 @@ static int repair_step(struct snapraid_state* state, int rehash, unsigned pos, u
|
|||
return 0;
|
||||
}
|
||||
|
||||
fprintf(stdlog, "error:%u:qarity: Data error\n", pos);
|
||||
fprintf(stdlog, "error:%u:q-parity: Data error\n", pos);
|
||||
++error;
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ static int repair_step(struct snapraid_state* state, int rehash, unsigned pos, u
|
|||
return 0;
|
||||
}
|
||||
|
||||
fprintf(stdlog, "error:%u:parity/qarity: Data error\n", pos);
|
||||
fprintf(stdlog, "error:%u:parity/q-parity: Data error\n", pos);
|
||||
++error;
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ static int repair_step(struct snapraid_state* state, int rehash, unsigned pos, u
|
|||
return 0;
|
||||
}
|
||||
|
||||
fprintf(stdlog, "error:%u:parity/qarity: Data error\n", pos);
|
||||
fprintf(stdlog, "error:%u:parity/q-parity: Data error\n", pos);
|
||||
++error;
|
||||
}
|
||||
|
||||
|
|
|
|||
2
dup.c
2
dup.c
|
|
@ -95,7 +95,7 @@ void state_dup(struct snapraid_state* state)
|
|||
|
||||
count = 0;
|
||||
size = 0;
|
||||
|
||||
|
||||
/* for each disk */
|
||||
for(i=state->disklist;i!=0;i=i->next) {
|
||||
tommy_node* j;
|
||||
|
|
|
|||
30
snapraid.c
30
snapraid.c
|
|
@ -508,6 +508,21 @@ int main(int argc, char* argv[])
|
|||
raid_init();
|
||||
crc32c_init();
|
||||
|
||||
/* open the log file */
|
||||
if (log == 0)
|
||||
log = "2";
|
||||
if (strcmp(log, "1") == 0) {
|
||||
stdlog = stdout;
|
||||
} else if (strcmp(log, "2") == 0) {
|
||||
stdlog = stderr;
|
||||
} else {
|
||||
stdlog = fopen(log, "wt");
|
||||
if (!stdlog) {
|
||||
fprintf(stderr, "Error opening the log file '%s'. %s.\n", log, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!opt.skip_self)
|
||||
selftest(opt.gui);
|
||||
|
||||
|
|
@ -534,21 +549,6 @@ int main(int argc, char* argv[])
|
|||
(void)lock;
|
||||
#endif
|
||||
|
||||
/* open the log file */
|
||||
if (log == 0)
|
||||
log = "2";
|
||||
if (strcmp(log, "1") == 0) {
|
||||
stdlog = stdout;
|
||||
} else if (strcmp(log, "2") == 0) {
|
||||
stdlog = stderr;
|
||||
} else {
|
||||
stdlog = fopen(log, "wt");
|
||||
if (!stdlog) {
|
||||
fprintf(stderr, "Error opening the log file '%s'. %s.\n", log, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (operation == OPERATION_DIFF) {
|
||||
state_read(&state);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue