Commit graph

565 commits

Author SHA1 Message Date
Andrea Mazzoleni
3bdc9b93ad Add additional checks on parity size
Ensures that it's always aligned at the block size.
Also adds more comments about resizing process.
2016-09-28 20:32:50 +02:00
Andrea Mazzoleni
422d642591 Check that the parity was fully allocated
We must check if any remaining size is left to be
allocated.
2016-09-28 18:55:50 +02:00
Andrea Mazzoleni
29fb2b22a2 Explain why errno is set to 0 2016-09-23 16:46:54 +02:00
Andrea Mazzoleni
7d65eb83b1 Improve the discard-window write strategy
Now flush the window before discarding it in the previous
loop, following exactly the Linus advices.
2016-09-09 19:52:39 +02:00
Andrea Mazzoleni
b5e5a0791b Fix a typo in a comment 2016-09-06 21:11:15 +02:00
Andrea Mazzoleni
85df40f40d Clarify about the space holder for Windows
In Windows we keep 256 MB to avoid warnings.
2016-08-31 22:26:17 +02:00
Andrea Mazzoleni
5911da55c0 In Windows leave 256 MB of free space in the parity disk
This is done to avoid the annoying warning message of
disk full.
2016-07-27 23:06:59 +02:00
Andrea Mazzoleni
6637d712a3 Remove unneded assignment
It confuses static analyzers.
2016-07-26 21:08:42 +02:00
Andrea Mazzoleni
00e1ca5997 Enforce a check on the content parity level
This to avoid that damaged files cause a crash.
2016-07-26 20:56:21 +02:00
Andrea Mazzoleni
0b4aee793a Avoid to close invalid handle
This could happen if open() return -1.
2016-07-26 20:51:20 +02:00
Andrea Mazzoleni
ef6958b410 No way to fix the wrong aligment
The only possibility is to regenerate parity.
2016-07-26 19:34:48 +02:00
Andrea Mazzoleni
2b31d23a10 Fix incorrect split size
This fixes invalid size stored in the content file
generated by previous bad BETA versions.
2016-07-25 22:23:32 +02:00
Andrea Mazzoleni
501b1d7983 Avoid extra allocation in parity file
After growing the parity file, call an extra ftruncate()
to ensure to cut the file to the exact size, removing any extra
allocation that could result by failed attempts to grow it.
Note that how fallocate() behaves on failures is not really
specified, so it's possible that extra space is allocated.
2016-07-25 21:58:20 +02:00
Andrea Mazzoleni
56c129f825 Remove compiler warnings in Windows 2016-06-30 21:17:44 +02:00
Andrea Mazzoleni
be7fd4888a Allow to add and remove new parity split
We now assume correct the input from the configuration
and the content file is adapted to it, but only if it's
without losing info.
2016-06-26 00:13:20 +02:00
Andrea Mazzoleni
87529baca4 Print the probability of failure in the log
It's just after the ":afr:" tag.
2016-05-30 22:44:58 +02:00
Andrea Mazzoleni
b3cc9192cd Don't print disk dir in info 2016-05-29 19:23:42 +02:00
Andrea Mazzoleni
dd87022490 Remove unnecessary prefix char in escaping
We can encode it at higher level.
2016-05-29 18:23:43 +02:00
Andrea Mazzoleni
256db0e595 Rename internal esc/quote functions
No functional change
2016-05-29 18:19:32 +02:00
Andrea Mazzoleni
20cd1f86f8 Fix typos in comments
No functional change.
2016-05-23 22:37:18 +02:00
Andrea Mazzoleni
cdc0a1cd93 Rename chunk to extent
No functional change.
2016-05-23 22:10:05 +02:00
Andrea Mazzoleni
3c6c5c07c7 More extensive use of data_off_t
This avoids the need of some type cast.
2016-05-18 20:58:41 +02:00
Andrea Mazzoleni
f5d1afaaed Change the default advise mode to 'flush'
This is expected to fix the problem reported in the
Forum about slow write due the big amount of RAM
that delay the write for a long time.
2016-05-18 20:45:05 +02:00
Andrea Mazzoleni
397c58c41e Add new IO window advise modes 2016-05-18 20:45:02 +02:00
Andrea Mazzoleni
4298a238e9 Add option to skip content write in sync 2016-05-17 23:17:31 +02:00
Andrea Mazzoleni
bec310d50b Add regression test for multi parity 2016-05-17 19:08:12 +02:00
Andrea Mazzoleni
10a308396e Don't upgrade the content file to version 3 if possible
This avoids to make it incompatible with old versions.
2016-05-15 14:51:02 +02:00
Andrea Mazzoleni
21241c5078 Preliminary advise support 2016-05-15 14:50:59 +02:00
Andrea Mazzoleni
32a57a5808 Apply filters also to empty dir
Doesn't always include them when using filter options.
2016-05-15 14:27:35 +02:00
Andrea Mazzoleni
69efbf264a Quote file path in fix messages 2016-05-15 14:27:35 +02:00
Andrea Mazzoleni
2bebc5d953 Add fallocate in Windows and comment about its use 2016-05-15 14:27:35 +02:00
Andrea Mazzoleni
f564e9b91a Preliminary support for multiple parity files
This allows to split parity in different partitions.
2016-05-15 14:27:33 +02:00
Andrea Mazzoleni
1ce7b61f29 Convert null devices as first operation
This ensure that all the usages are with the
real device number.
Also avoid to resolve device in spinup to suppor
filesystem that cannot be resolved, like ZFS.
2016-04-29 20:53:01 +02:00
Andrea Mazzoleni
a0307ca29d Detect device also from the major:minor of the mount point
This is required for btrfs in new distributions, because
the major:minor reported in /proc/self/mountinfo doesn't
match the one of the mount point.
2016-04-28 22:27:57 +02:00
Andrea Mazzoleni
6053096862 Extend the split function to support multiple delimiters 2016-04-26 21:26:15 +02:00
Andrea Mazzoleni
4cc1109444 Add support for null device numbers
They are resolved using the mountinfo interface and
mapping them to the block device listed there.
2016-04-23 16:24:26 +02:00
Andrea Mazzoleni
cca81e7ff6 Fix some typos in comments 2016-04-20 22:12:16 +02:00
Andrea Mazzoleni
e760df8877 Reset all fields of the Windows overlapped struct
To be 100% compliant with MSDN.
2016-04-10 23:01:42 +02:00
Andrea Mazzoleni
e77c3742ac Small clearification comment 2016-04-10 22:56:28 +02:00
Andrea Mazzoleni
36a4d24333 Source code beautification
Done with uncrustify.
2016-04-10 22:46:09 +02:00
Andrea Mazzoleni
5bf030c793 Disable some operations affected by hash collision
This only if we are working with a reduced hash length.
2016-04-10 19:13:08 +02:00
Andrea Mazzoleni
ab7d4e896c Support a configurable hash size 2016-04-07 22:37:11 +02:00
Andrea Mazzoleni
5b06549ee3 Make the hash size configurable
Only at source code level.
2016-04-07 21:39:02 +02:00
Andrea Mazzoleni
8e2cb48ea7 Add alternatives for RtlGenRandom 2016-04-01 22:12:47 +02:00
Andrea Mazzoleni
8d3cefb302 Allow compilation without pthread support 2016-03-18 18:45:35 +01:00
Andrea Mazzoleni
fe3ad31cbb Allow to disable the multithread mode
Use the --test-io-cache=1 option to use a special
monothread mode.
2016-03-18 18:33:11 +01:00
Andrea Mazzoleni
8fbd8b35ea Add support for escaping in Windows with the '^' char 2016-03-05 12:05:11 +01:00
Andrea Mazzoleni
ecff017ffe Log more information during UUID detection 2016-03-01 23:29:46 +01:00
Andrea Mazzoleni
62e4b7e14c Clearer blkid message about package to install 2016-03-01 22:16:19 +01:00
Andrea Mazzoleni
7992ca1a77 Extend the diff manual and reorder the final summary 2016-02-14 10:37:44 +01:00