mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Keeps the fast sync mode as the default mode.
This commit is contained in:
parent
a64b416741
commit
3dadfb99e9
10 changed files with 48 additions and 48 deletions
|
|
@ -398,11 +398,11 @@ endif
|
|||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-expect-unrecoverable -c $(PAR2) fix -l test.log
|
||||
rm -r test/disk1/a_copy
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) sync
|
||||
echo --- Abort sync late with additions with rawsync and then delete the new additions and sync again
|
||||
echo --- Abort sync late with additions with prehash and then delete the new additions and sync again
|
||||
cp -pR test/disk1/a test/disk1/a_copy
|
||||
cp -pR test/disk2/a test/disk2/a_copy
|
||||
cp -pR test/disk3/a test/disk3/a_copy
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-kill-after-sync --test-rawsync -c $(CONF) sync
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-kill-after-sync --test-prehash -c $(CONF) sync
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) check
|
||||
rm -r test/disk1/a_copy
|
||||
rm -r test/disk2/a_copy
|
||||
|
|
|
|||
14
snapraid.1
14
snapraid.1
|
|
@ -974,17 +974,17 @@ commands interrupted by a machine crash, or any other event that
|
|||
may interrupt SnapRAID.
|
||||
The SIZE argument is specified in gibibytes. Where one gibi bytes
|
||||
is 1073741824 bytes.
|
||||
.SS rawsync
|
||||
Enables a single pass \(a"sync\(a" process avoding the initial hashing phase
|
||||
and saving time.
|
||||
In this mode no preliminary hashing is done, and the new data is hashed
|
||||
directly during the parity computation when it\(cqs read for the first time,
|
||||
.SS prehash
|
||||
Enables a double pass \(a"sync\(a" process with an initial hashing phase.
|
||||
In the default \(a"sync\(a" mode no preliminary hashing is done, and the new
|
||||
data is hashed directly during the parity computation when it\(cqs read
|
||||
for the first time,
|
||||
This happens when the system is under heavy pressure due all disks spinning
|
||||
and CPU busy, and in such extreme conditions, if your machine has a latent
|
||||
hardware problem, it\(cqs possible to encouter silent errors what cannot be
|
||||
detected because the data is not yet hashed.
|
||||
To avoid this problem, this \(a"rawsync\(a" mode is by default disabled,
|
||||
but if you really trust your hardware, you can enable it, and save time.
|
||||
To avoid this risk, you can enable the \(a"prehash\(a" mode and have all the
|
||||
data hashed two times to ensure its integrity.
|
||||
.SS pool DIR
|
||||
Defines the pooling directory where the virtual view of the disk
|
||||
array is created using the \(a"pool\(a" command.
|
||||
|
|
|
|||
10
snapraid.c
10
snapraid.c
|
|
@ -104,7 +104,7 @@ void memory(void)
|
|||
#define OPT_TEST_FORCE_SCRUB_EVEN 272
|
||||
#define OPT_TEST_FORCE_CONTENT_WRITE 273
|
||||
#define OPT_TEST_FORCE_CONTENT_TEXT 274
|
||||
#define OPT_TEST_RAWSYNC 275
|
||||
#define OPT_TEST_PREHASH 275
|
||||
|
||||
#if HAVE_GETOPT_LONG
|
||||
struct option long_options[] = {
|
||||
|
|
@ -186,8 +186,8 @@ struct option long_options[] = {
|
|||
/* Force the use of text content file . */
|
||||
{ "test-force-content-text", 0, 0, OPT_TEST_FORCE_CONTENT_TEXT },
|
||||
|
||||
/* Like the rawsync configuration option. */
|
||||
{ "test-rawsync", 0, 0, OPT_TEST_RAWSYNC },
|
||||
/* Like the prehash configuration option. */
|
||||
{ "test-prehash", 0, 0, OPT_TEST_PREHASH },
|
||||
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
|
@ -457,8 +457,8 @@ int main(int argc, char* argv[])
|
|||
case OPT_TEST_FORCE_CONTENT_TEXT :
|
||||
opt.force_content_text = 1;
|
||||
break;
|
||||
case OPT_TEST_RAWSYNC :
|
||||
opt.rawsync = 1;
|
||||
case OPT_TEST_PREHASH :
|
||||
opt.prehash = 1;
|
||||
break;
|
||||
default:
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
|
|||
|
|
@ -63,19 +63,19 @@ exclude /lost+found/
|
|||
# Format: "autosave SIZE_IN_GiB"
|
||||
#autosave 500
|
||||
|
||||
# Enables a single pass "sync" process avoding the initial hashing phase
|
||||
# and saving time.
|
||||
# In this mode no preliminary hashing is done, and the new data is hashed
|
||||
# directly during the parity computation when it's read for the first time,
|
||||
# Enables a double pass "sync" process with an initial hashing phase.
|
||||
# In the default "sync" mode no preliminary hashing is done, and the new
|
||||
# data is hashed directly during the parity computation when it's read
|
||||
# for the first time,
|
||||
# This happens when the system is under heavy pressure due all disks spinning
|
||||
# and CPU busy, and in such extreme conditions, if your machine has a latent
|
||||
# hardware problem, it's possible to encouter silent errors what cannot be
|
||||
# detected because the data is not yet hashed.
|
||||
# To avoid this problem, this "rawsync" mode is by default disabled,
|
||||
# but if you really trust your hardware, you can enable it, and save time.
|
||||
# To avoid this risk, you can enable the "prehash" mode and have all the
|
||||
# data hashed two times to ensure its integrity.
|
||||
#
|
||||
# Format: rawsync
|
||||
#rawsync
|
||||
# Format: prehash
|
||||
#prehash
|
||||
|
||||
# Defines the pooling directory where the virtual view of the disk
|
||||
# array is created using the "pool" command (uncomment to enable).
|
||||
|
|
|
|||
|
|
@ -67,19 +67,19 @@ exclude \Windows\
|
|||
# Format: "autosave SIZE_IN_GiB"
|
||||
#autosave 500
|
||||
|
||||
# Enables a single pass "sync" process avoding the initial hashing phase
|
||||
# and saving time.
|
||||
# In this mode no preliminary hashing is done, and the new data is hashed
|
||||
# directly during the parity computation when it's read for the first time,
|
||||
# Enables a double pass "sync" process with an initial hashing phase.
|
||||
# In the default "sync" mode no preliminary hashing is done, and the new
|
||||
# data is hashed directly during the parity computation when it's read
|
||||
# for the first time,
|
||||
# This happens when the system is under heavy pressure due all disks spinning
|
||||
# and CPU busy, and in such extreme conditions, if your machine has a latent
|
||||
# hardware problem, it's possible to encouter silent errors what cannot be
|
||||
# detected because the data is not yet hashed.
|
||||
# To avoid this problem, this "rawsync" mode is by default disabled,
|
||||
# but if you really trust your hardware, you can enable it, and save time.
|
||||
# To avoid this risk, you can enable the "prehash" mode and have all the
|
||||
# data hashed two times to ensure its integrity.
|
||||
#
|
||||
# Format: rawsync
|
||||
#rawsync
|
||||
# Format: prehash
|
||||
#prehash
|
||||
|
||||
# Defines the pooling directory where the virtual view of the disk
|
||||
# array is created using the "pool" command (uncomment to enable).
|
||||
|
|
|
|||
14
snapraid.d
14
snapraid.d
|
|
@ -742,17 +742,17 @@ Configuration
|
|||
The SIZE argument is specified in gibibytes. Where one gibi bytes
|
||||
is 1073741824 bytes.
|
||||
|
||||
rawsync
|
||||
Enables a single pass "sync" process avoding the initial hashing phase
|
||||
and saving time.
|
||||
In this mode no preliminary hashing is done, and the new data is hashed
|
||||
directly during the parity computation when it's read for the first time,
|
||||
prehash
|
||||
Enables a double pass "sync" process with an initial hashing phase.
|
||||
In the default "sync" mode no preliminary hashing is done, and the new
|
||||
data is hashed directly during the parity computation when it's read
|
||||
for the first time,
|
||||
This happens when the system is under heavy pressure due all disks spinning
|
||||
and CPU busy, and in such extreme conditions, if your machine has a latent
|
||||
hardware problem, it's possible to encouter silent errors what cannot be
|
||||
detected because the data is not yet hashed.
|
||||
To avoid this problem, this "rawsync" mode is by default disabled,
|
||||
but if you really trust your hardware, you can enable it, and save time.
|
||||
To avoid this risk, you can enable the "prehash" mode and have all the
|
||||
data hashed two times to ensure its integrity.
|
||||
|
||||
pool DIR
|
||||
Defines the pooling directory where the virtual view of the disk
|
||||
|
|
|
|||
14
snapraid.txt
14
snapraid.txt
|
|
@ -806,17 +806,17 @@ may interrupt SnapRAID.
|
|||
The SIZE argument is specified in gibibytes. Where one gibi bytes
|
||||
is 1073741824 bytes.
|
||||
|
||||
---- 7.8.2 rawsync ----
|
||||
Enables a single pass "sync" process avoding the initial hashing phase
|
||||
and saving time.
|
||||
In this mode no preliminary hashing is done, and the new data is hashed
|
||||
directly during the parity computation when it's read for the first time,
|
||||
---- 7.8.2 prehash ----
|
||||
Enables a double pass "sync" process with an initial hashing phase.
|
||||
In the default "sync" mode no preliminary hashing is done, and the new
|
||||
data is hashed directly during the parity computation when it's read
|
||||
for the first time,
|
||||
This happens when the system is under heavy pressure due all disks spinning
|
||||
and CPU busy, and in such extreme conditions, if your machine has a latent
|
||||
hardware problem, it's possible to encouter silent errors what cannot be
|
||||
detected because the data is not yet hashed.
|
||||
To avoid this problem, this "rawsync" mode is by default disabled,
|
||||
but if you really trust your hardware, you can enable it, and save time.
|
||||
To avoid this risk, you can enable the "prehash" mode and have all the
|
||||
data hashed two times to ensure its integrity.
|
||||
|
||||
---- 7.8.3 pool DIR ----
|
||||
Defines the pooling directory where the virtual view of the disk
|
||||
|
|
|
|||
4
state.c
4
state.c
|
|
@ -681,8 +681,8 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
|
|||
tommy_list_insert_tail(&state->disklist, &disk->node, disk);
|
||||
} else if (strcmp(tag, "nohidden") == 0) {
|
||||
state->filter_hidden = 1;
|
||||
} else if (strcmp(tag, "rawsync") == 0) {
|
||||
state->opt.rawsync = 1;
|
||||
} else if (strcmp(tag, "prehash") == 0) {
|
||||
state->opt.prehash = 1;
|
||||
} else if (strcmp(tag, "exclude") == 0) {
|
||||
struct snapraid_filter* filter;
|
||||
|
||||
|
|
|
|||
2
state.h
2
state.h
|
|
@ -59,7 +59,7 @@ struct snapraid_option {
|
|||
int verbose; /**< Verbose output. */
|
||||
int quiet; /**< Quiet output. */
|
||||
int gui; /**< Gui output. */
|
||||
int rawsync; /**< Enables the raw sync mode. */
|
||||
int prehash; /**< Enables the prehash mode. */
|
||||
int force_zero; /**< Forced dangerous operations of synching files now with zero size. */
|
||||
int force_empty; /**< Forced dangerous operations of synching disks now empty. */
|
||||
int force_uuid; /**< Forced dangerous operations of synching disks with uuid changed. */
|
||||
|
|
|
|||
2
sync.c
2
sync.c
|
|
@ -1017,7 +1017,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
|
||||
unrecoverable_error = 0;
|
||||
|
||||
if (!state->opt.rawsync) {
|
||||
if (state->opt.prehash) {
|
||||
printf("Hashing...\n");
|
||||
|
||||
skip_sync = state_hash_process(state, blockstart, blockmax);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue