Commit graph

49 commits

Author SHA1 Message Date
Andrea Mazzoleni
a3121c31c5 Add support for multithread parity writing in sync 2016-01-09 10:25:56 +01:00
Andrea Mazzoleni
62b7587c3a IO functions renaming to prepare for parity write support
No functional change.
2016-01-09 10:25:56 +01:00
Andrea Mazzoleni
afd29347bb Restore the io error limit feature for multithread support 2016-01-09 10:18:14 +01:00
Andrea Mazzoleni
cbf2040b89 Add mutex protection at the filesystem structure
In sync we need to modify the filesystem, like to call
fs_deallocate(). We need then proper protection.
This also removes the need of multiple fs_last cached value.
2016-01-09 10:18:14 +01:00
Andrea Mazzoleni
51af8931b7 Add support for multithread data and parity reading in scrub 2016-01-09 10:18:14 +01:00
Andrea Mazzoleni
3c00248aa6 Add level knownledge to parity handle 2016-01-09 10:18:14 +01:00
Andrea Mazzoleni
a279333c0b Alternate scrub next block computation 2016-01-09 10:18:14 +01:00
Andrea Mazzoleni
5249f9cb04 Fix various typos in comments 2016-01-02 16:52:20 +01:00
Andrea Mazzoleni
f389afe678 Avoid to log limits if not relevant for the scrub plan 2015-11-20 19:29:04 +01:00
Andrea Mazzoleni
fa3f17ac20 Restore defalt scrub percentage to 8%
This is like the previous 8.1 version, even if the documented
one in the doc was 12%, the real one was 1/12==8%.
2015-11-12 23:04:49 +01:00
Andrea Mazzoleni
40265401d3 Rename the --percentage option to --plan
The old --percentage is still supported, but not documented anymore.
2015-11-10 19:37:23 +01:00
Andrea Mazzoleni
1917814d2d Restore the default scrub behaviour of the previous version
If the user like to scrub new blocks, he can now use the -p new
option, and then call again scrub with a percentage to scrub the
old blocks.

Scrubbing old and new blocks are two different operations, and make
sense to keep them separated. Mixing them could instead raise
problematic issues, like not being able to predict the time required
for a full scrub cycle, as it depends also on the amount of synced
data.
2015-11-09 23:34:41 +01:00
Andrea Mazzoleni
7f17d667e6 Change the default scrub percentage to 15%
This is done to take into account that now
synced blocks are scrubbed with priority.
2015-11-08 16:52:29 +01:00
Andrea Mazzoleni
452a595067 Adjust verbs in comments 2015-10-07 22:07:20 +02:00
Andrea Mazzoleni
fa775d24a8 More interface changes to prepare to the use of tree mapping 2015-10-04 22:03:58 +02:00
Andrea Mazzoleni
0407c945db Change the interface for parity allocation
This will allow a more compact representation
of the parity allocation
2015-10-01 23:24:06 +02:00
Andrea Mazzoleni
2555248645 Extend the -p option with bad/sync/full arguments 2015-09-13 15:48:05 +02:00
Andrea Mazzoleni
3bf691ff7d On data error, prints the number of different bits 2015-09-12 15:19:52 +02:00
Andrea Mazzoleni
cca2cbb23f Scrub first the just synced blocks 2015-08-27 18:58:25 +02:00
Andrea Mazzoleni
9a5f30cd32 Add a new justsynced info bit to position
The value 0 means that the block is scrubbed, and it allows
an easy conversion of past content files.
Note that past versions ignore this info when using binary
content files, then we don't increase the version of the format.
2015-08-27 18:02:12 +02:00
Andrea Mazzoleni
de0c437bd2 Put a clear separation between log and msg functions 2015-04-20 22:07:42 +02:00
Andrea Mazzoleni
adbc74f862 Suppress missing file warnings if -m is specified 2015-04-19 21:21:49 +02:00
Andrea Mazzoleni
2e248b42ae Change the scrub error msg if there are too many errors 2015-04-19 21:10:58 +02:00
Andrea Mazzoleni
e56de653da Introduce a new messaging system 2015-02-22 14:31:03 +01:00
Andrea Mazzoleni
ea07a7025e Escape path in the log file 2015-02-12 22:55:05 +01:00
Andrea Mazzoleni
2ac751b6d9 Put all the stdout output also in stdlog 2015-02-03 19:35:43 +01:00
Andrea Mazzoleni
3884af54ea Put the "Stopping" message into stderr 2015-02-03 18:53:23 +01:00
Andrea Mazzoleni
798de7ca99 Change the flush logic for streams
Now stdout and stderr are always line buffered, and stdlog only
flushed on request.
2015-02-03 18:29:11 +01:00
Andrea Mazzoleni
80d51384ac Adjust some error messages in some commands 2015-02-03 18:12:52 +01:00
Andrea Mazzoleni
b5ce575981 Change the log and output handling
Now the log file contains all the errors messages,
and all the tag lines.
2015-02-02 23:39:46 +01:00
Andrea Mazzoleni
ad57aafd8f Refactor the parity size detection before sync.
Now we resize the parity only after checking the size of all
the parity file.
2015-02-01 18:48:50 +01:00
Andrea Mazzoleni
ffe7f6fa57 Adds new files support.c/h for low level support functions. 2015-01-02 18:52:04 +01:00
Andrea Mazzoleni
0b59dc92a6 Allows sync and scrub to continue on input/output errors.
There is an upper limit on the allowed errors in
the new opt.io_error_limit variable.
2014-12-30 09:45:35 +01:00
Andrea Mazzoleni
aee56ba2c7 Prints a final warning in case of silent error for sync and scrub. 2014-12-29 19:36:01 +01:00
Andrea Mazzoleni
47c2165f63 Removes duplicate code introducing block_is_enabled(). 2014-12-29 19:11:03 +01:00
Andrea Mazzoleni
c8edf2f002 In scrub don't check the inode to verify if the file is synced.
On filesystem without persistent inode, they can be different from
one run to another.
In sync they are automatically adjusted, but not in scrub.
2014-12-29 00:00:04 +01:00
Andrea Mazzoleni
1f70f1ea33 Uses a better error detection in sync/scrub. 2014-12-27 23:14:06 +01:00
Andrea Mazzoleni
bc4d2dc3f6 Keeps track of IO errors in scrub like we do for silent errors. 2014-12-07 00:07:36 +01:00
Andrea Mazzoleni
c647e75885 Adds regression test for autosave. 2014-11-10 23:06:14 +01:00
Andrea Mazzoleni
0c539a0b35 Handles better upgrading in the status command. 2014-11-09 22:24:20 +01:00
Andrea Mazzoleni
7e9a5e6a6d Stores the free space in the content file.
This avoids the need to access data and parity disks in
the status command.
Also removed some data disk access, in list, dup and similar
commands that don't need to scan the disks.
2014-11-09 19:14:29 +01:00
Andrea Mazzoleni
4419801674 Merges parity info in a parity struct. 2014-11-09 10:32:00 +01:00
Andrea Mazzoleni
7718e6d206 Renames snapraid_parity to handle. 2014-11-09 10:25:39 +01:00
Andrea Mazzoleni
876bddcf4c Beautifies the code. 2014-09-27 00:32:39 +02:00
Andrea Mazzoleni
4adcf7c5cc Prints time stats also in scrub. 2014-09-08 21:18:11 +02:00
Andrea Mazzoleni
6700b928c2 Adds a new file_mode setting to control the file access mode. 2014-09-04 22:52:04 +02:00
Andrea Mazzoleni
98e1f66baa Uses a precise counting in scrub.
Now the exact number of blocks is scrubbed regardless
the time organization of the blocks.
2014-07-02 23:02:49 +02:00
Andrea Mazzoleni
2652438f6d More logging info for scrub and commandline. 2014-06-29 10:49:13 +02:00
Andrea Mazzoleni
44ef039a13 Different source organization. 2014-03-23 17:50:27 +01:00
Renamed from src/scrub.c (Browse further)