Commit graph

565 commits

Author SHA1 Message Date
Andrea Mazzoleni
4d52890c32 Avoid the Windows abort dialog 2015-12-19 08:20:51 +01:00
Andrea Mazzoleni
d5c0a8c2f3 Support the case of an empty symlink
There is the report of a such condition in Windows.
2015-12-18 19:52:30 +01:00
Andrea Mazzoleni
61402049bc Fix the counting of different bits, as it was always return 0 2015-12-13 18:42:36 +01:00
Andrea Mazzoleni
96501697bb More os_abort() use after decoding_error() 2015-12-12 18:17:30 +01:00
Andrea Mazzoleni
c7ed079f79 More info in case of the "Path too long" message 2015-12-12 17:56:44 +01:00
Andrea Mazzoleni
448774fb8f Print also the too long path to help detection 2015-12-12 17:10:31 +01:00
Andrea Mazzoleni
7313e3d9d0 In case of the "Path too long" message prints the stacktrace 2015-12-12 17:10:28 +01:00
Andrea Mazzoleni
f8214de959 Adjust UUID printing in the log 2015-12-11 18:59:24 +01:00
Andrea Mazzoleni
5541f8d5e6 Add UUID reading support using libblkid
This fixes the Btrfs case where the root UUIDs are not
present in the /dev/disk/by-uuid directory.
2015-12-10 22:51:19 +01:00
Andrea Mazzoleni
fcc3894667 Add regression test for UUID change 2015-12-10 22:51:16 +01:00
Andrea Mazzoleni
cab1b43d3b Add a missing newline in the force-empty message 2015-12-04 22:13:26 +01:00
Andrea Mazzoleni
f71ddbb3fd Add backtrace support for internal errors 2015-12-04 22:02:31 +01:00
Andrea Mazzoleni
a66ccb5cc1 Some more regression tests for move/copy/invalidate 2015-12-01 23:44:06 +01:00
Andrea Mazzoleni
a79052baa6 Add a new --test-no-warnings option
It disables annoying warnings that expert user don't
want to see.
2015-11-24 18:49: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
193519d8fc Fix a data race in Windows for the customized strerror()
To proper support multithread we have to use the thread local
storage for keeping the latest error.
2015-11-20 18:58:59 +01:00
Andrea Mazzoleni
d927a58e4e Remove dead code about adjusting the first free parity position
We already known that the update of the first parity position
is never triggered, and then we can avoid to query the parity
position at all.
2015-11-20 18:29:53 +01:00
Andrea Mazzoleni
df22c18515 Remove abort() call left in for testing 2015-11-20 00:01:18 +01:00
Andrea Mazzoleni
13ebe5824f Fix a possible data race in Windows for UTF-8 conversion
We had less conversion buffers than possible threads,
possibly resulting in a buffer used more than one time.
Now converted to use local stack buffers to avoid
the need of any kind of syncronization between threads.
2015-11-19 19:38:39 +01:00
Andrea Mazzoleni
b775135175 Fix a build issue when the pthread library is not available 2015-11-19 19:14:15 +01:00
Andrea Mazzoleni
910c7b717c Fix a typo in a comment 2015-11-18 23:19:57 +01:00
Andrea Mazzoleni
cf335f8258 Avoid an unused variable warning in the Windows builds 2015-11-18 23:17:10 +01:00
Andrea Mazzoleni
496611f476 Fix an integer overflow when computing the size of a deleted entry
This bug prevented SnapRAID to read a valid content file, in case
a deleted entry bigger than 4 GB was present.
This could be reproduced deleting a file bigger than 4 GB and then sync.
2015-11-18 23:14:04 +01:00
Andrea Mazzoleni
9bd0f18439 Replace assertions with more informative messages 2015-11-18 22:10:50 +01:00
Andrea Mazzoleni
6b55d2a292 Add extra assertions and consistency checks 2015-11-16 22:54:00 +01:00
Andrea Mazzoleni
903ced679f Disable the file zero check in Windows 2015-11-14 17:03:52 +01:00
Andrea Mazzoleni
04e3a7f719 Fix the latest column of the status graph
The convertion from info to time was not necessary, as the value
is already a time. It was clearing the TIME_NEW bit, not showing
corretly the latest column in the graph.
2015-11-13 21:47:13 +01:00
Andrea Mazzoleni
cba363e898 Fix a wrong logic increment in status report 2015-11-13 21:07:30 +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
54c91ec440 Ensure a side effect in CRC computation 2015-11-11 08:02:54 +01:00
Andrea Mazzoleni
4030b18d40 Show differently scrubbed and new blocks in the graph 2015-11-10 21:27:56 +01:00
Andrea Mazzoleni
4b5c27900f Change the status message for the not scrubbed percentage 2015-11-10 19:51:38 +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
3ea6714236 Cleanup resource on thread errors
We are going to exit() anyway, but static analyzers
don't known that.
2015-10-31 16:46:15 +01:00
Andrea Mazzoleni
06cbc7d482 Some missing coverage exclusions 2015-10-31 16:29:08 +01:00
Andrea Mazzoleni
8ff39bb9bf Fix thread operations using thread-safe functions
We have a common disk cache, that we cannot share
during multithread operations.

Intead of using a mutex to access the cache, we use a
local thread cache.
2015-10-30 19:06:24 +01:00
Andrea Mazzoleni
fcf7c44197 Use different thread when writing content file
This should reduce the possibility that the same
memory error is going to affect all the written
content files in the same way.
2015-10-29 23:37:58 +01:00
Andrea Mazzoleni
80476c480b Delayed CRC computation of the buffer used in writing
This should help to detect more memory errors when writing
the content files.
2015-10-29 22:32:07 +01:00
Andrea Mazzoleni
204656b129 Verify the CRC of content files after writing them 2015-10-28 22:04:04 +01:00
Andrea Mazzoleni
0a89c6d196 Add testing for the new sdeplete() function 2015-10-28 19:45:12 +01:00
Andrea Mazzoleni
7e1d9138b5 Add the deplete operation at the data stream
It's used to read the content file up to the end to verify its CRC.
2015-10-28 19:36:24 +01:00
Andrea Mazzoleni
104c47d106 Add a proper signal handling
The most common signals are now intercepted with SA_RESTART
to allow a clean interruption.
2015-10-26 19:32:41 +01:00
Andrea Mazzoleni
4c9da1fa43 Use a more severe error reporting for --force-device
We want to be sure that such messages are not ignored.
2015-10-18 23:04:56 +02:00
Andrea Mazzoleni
2b69cfa073 Extend the disk filtering to parity disk
You can now fix a specific parity disk,
without touching the others.
2015-10-17 17:36:40 +02:00
Andrea Mazzoleni
3e83b15bbb Extend --force-device to ignore more erroneous conditions
We want to allow fix also if some disk is unaccessible,
and content files not present.
2015-10-16 23:17:38 +02:00
Andrea Mazzoleni
841e6306e3 Avoid the duplicated 'Missing file' message
When fixing with filters, the filtered out files
were reported multiple times as missing.
We now mark if a file is missing, and we avoid
to try to open it multiple times.
2015-10-15 19:39:48 +02:00
Andrea Mazzoleni
c6526a1a97 Update SMART stats with BackBlaze data 2015 Q3 2015-10-14 21:52:35 +02:00
Andrea Mazzoleni
8de54cb863 Better testing with fake devices 2015-10-09 18:35:24 +02:00