Commit graph

114 commits

Author SHA1 Message Date
Andrea Mazzoleni
3dfab5232c Prevent partial fix from finalizing incomplete files 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
036b099eae Keep unrecoverable files quarantined until fix completion 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
65e6564e13 Clarify CHG block handling during interrupted sync recovery 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
f453a72369 Preserve recovery state until a full clean sync completes 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
eebb3943e5 Protect rate limiter state updates with a mutex to prevent data races 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
0ca7c65049 Support filesystems with invalid inode numbers on individual files 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
3878c0e2e6 Silence clang static analyzer warnings 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
ebe2bbe76c Document handle_close failures 2026-08-18 23:33:56 +02:00
Andrea Mazzoleni
bbcdb72a9f Introduce nalloc_nofail 2026-08-18 23:33:55 +02:00
Andrea Mazzoleni
00b4cbafd0 Merge the CLI and Daemon portable interface 2026-08-18 23:33:55 +02:00
Andrea Mazzoleni
f40b2decdb Further conversions from 32 to 64 bits 2026-08-18 23:33:54 +02:00
Andrea Mazzoleni
bbd3c23cd2 Migrate block_off_t to 64-bit with updated CLI parsing, VLQ serialization, and format specifiers 2026-08-18 23:33:54 +02:00
Andrea Mazzoleni
76998613da Remove the unused number of data disks from the vector allocation
The same addressing rules are applied to the parity disks because
they are used as data disks during recovery operations.
2026-08-18 23:33:54 +02:00
Andrea Mazzoleni
4a37e3fece Change the BLOCK_HASH_SIZE type to avoid potential overflow 2026-08-18 23:33:53 +02:00
Andrea Mazzoleni
54602422dd Change commenting style 2026-08-18 23:33:52 +02:00
Andrea Mazzoleni
5cfebba19e Remove unnecessary log argument 2026-06-03 20:57:08 +02:00
Andrea Mazzoleni
cc99a22929 Add protection for block position integer overflow 2026-06-03 19:07:31 +02:00
Andrea Mazzoleni
96e20b3912 Switch esc_tag and path formatting to a contiguous thread-local circular pool to eliminate stack bloat
Some checks failed
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL Advanced / Analyze (c-cpp) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
2026-05-29 11:22:04 +02:00
Andrea Mazzoleni
8749d0dfe3 Handle the cases of directory already create by another process 2026-05-21 10:30:14 +02:00
Andrea Mazzoleni
9f57d3217d Do not even attempt to recover if there are more failures than parities 2026-05-21 10:29:56 +02:00
Andrea Mazzoleni
0d0431a907 Simpler Copyright string 2026-04-09 17:56:49 +02:00
Christoph Hellwig
60269a1236 Use SPDX (https://spdx.dev/) tags to identify the license used for each
file, and a COPYING file explaining the licensing scheme, with the actual
licenses listed in the LICENSES/ directory.
2026-04-02 16:01:37 +02:00
Andrea Mazzoleni
077cf5de01 Detect more hardware errors 2026-02-24 08:39:50 +01:00
Andrea Mazzoleni
5dfeaf0ef6 Return with an error code if the there is a thermal alert that prevent starting
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
2026-02-09 23:52:10 +01:00
Andrea Mazzoleni
d3f7bf64c1 Differentiate messages in the log files if they are caused by an hardware issue 2026-02-01 20:44:36 +01:00
Andrea Mazzoleni
edcec26506 If a file is missing or truncated, output the error message only on the first block
Some checks failed
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL Advanced / Analyze (c-cpp) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
2026-01-27 00:07:41 +01:00
Andrea Mazzoleni
3e62e22411 Beautification with unscrustify 2026-01-26 09:42:03 +01:00
Andrea Mazzoleni
622b796208 Rename error counters
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
2026-01-25 22:21:47 +01:00
Andrea Mazzoleni
2cbc172fd3 Reworked recover tags 2026-01-25 14:24:36 +01:00
Andrea Mazzoleni
caf9cd3961 Review all the error messages 2026-01-25 11:14:29 +01:00
Andrea Mazzoleni
b29500c25f Update beautification with uncrustify 2026-01-22 16:13:25 +01:00
Andrea Mazzoleni
e80734fc4c Fix typos 2026-01-22 16:13:25 +01:00
Andrea Mazzoleni
69d9335c9c Revise log documentation
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
2026-01-17 19:13:52 +01:00
Andrea Mazzoleni
d46a2402b6 Beautify code with uncrustify 2026-01-05 15:59:03 +01:00
Andrea Mazzoleni
6729e2d0eb Some minimal tags changes 2025-12-11 12:54:18 +01:00
Andrea Mazzoleni
21acc31bf1 Beautify code with uncrustify 2025-10-26 18:11:45 +01:00
Andrea Mazzoleni
52ef48655f Improve and change the order of the user messages
The "Everything is OK" is now printed as latest one.
2025-10-13 13:51:18 +02:00
Andrea Mazzoleni
906d215bf5 Add thermal protection options: temp_limit and temp_sleep
Some checks failed
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Introduce two new configuration directives to protect disks from overheating:

- temp_limit <TEMPERATURE_CELSIUS>
  Sets the maximum allowed disk temperature. When any disk exceeds this limit,
  SnapRAID stops all operations and spins down the disks.

- temp_sleep <TIME_IN_MINUTES>
  Specifies how long disks remain in standby after a temperature event.
  Defaults to 15 minutes.

These options allow SnapRAID to automatically pause activity and cool down
disks when a temperature threshold is reached, improving data safety and
hardware longevity.
2025-09-27 16:05:05 +02:00
Andrea Mazzoleni
5fd41d215b Intercept Ctrl-C at startup of all commands
Some checks failed
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
2025-09-24 11:32:10 +02:00
Allan Clark
5886923bb1 Add bandwidth limit feature --bw-limit 2025-03-29 19:29:55 +01:00
Andrea Mazzoleni
a605442c8c Fix typos in messages 2023-12-09 15:35:45 +01:00
Andrea Mazzoleni
836fd6b1e0 Add a new undocumented --filter-block-error option 2021-07-08 08:07:03 +02:00
Andrea Mazzoleni
7654ed45f1 In fix/check with the -e option process the whole files with bad blocks 2021-05-22 22:28:19 +02:00
Andrea Mazzoleni
d5d10abcda Do not postprocess files in excluded blocks
The filtering is by files, so the last block is included.
The only exception is with an explicit end block, but in such case,
like when fixing bad blocks the post processing is not expected.
2021-05-22 22:00:07 +02:00
Andrea Mazzoleni
2a5b5499c4 Avoid to recompute the block status multiple times
Store it in a bit vector and reuse the result.
2021-05-22 11:37:36 +02:00
Andrea Mazzoleni
ff3fc0a194 Avoid to get the info block if not necessary 2021-05-22 10:14:56 +02:00
Andrea Mazzoleni
dd29375af1 Avoid to compose the file path if not necessary 2021-05-22 10:14:56 +02:00
Andrea Mazzoleni
cb8b3dc804 Print a new Selecting... stage to get an idea of the time spent on it 2021-05-22 10:14:53 +02:00
Andrea Gelmini
986e9b4131 Fix typos 2020-05-26 12:50:15 +02:00
Andrea Gelmini
f3b3182885 Fix variable name 2020-05-26 12:50:15 +02:00