Commit graph

123 commits

Author SHA1 Message Date
Andrea Mazzoleni
a39fb132f8 Normalize comment style
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
2026-10-07 09:14:01 +02:00
Andrea Mazzoleni
bcfd2734b6 Quiesce scrub read-ahead before autosave and distinguish read/write barriers 2026-09-24 19:49:46 +02:00
Andrea Mazzoleni
222136f1e7 Leave block empty for unlocalized close errors and use zero for parity open errors
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
2026-09-23 16:37:13 +02:00
Andrea Mazzoleni
1a5b28ad38 Mark scrub/sync blocks bad when data file open fails with an I/O error 2026-09-23 16:24:00 +02:00
Andrea Mazzoleni
c6951393e8 Exit code and logging invariants for log_fatal and hardware log_error
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
2026-09-21 17:27:07 +02:00
Andrea Mazzoleni
902c19b668 Specialize block hash copies for the full hash size 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
4a616558ec Treat trusted REBUILD hash mismatches as persistent silent data corruption 2026-09-09 15:46:59 +02:00
Andrea Mazzoleni
fe2a07fc78 Defer rehash completion for positions containing unsynchronized blocks 2026-09-08 13:36:51 +02:00
Andrea Mazzoleni
74647cda14 Make snapraid_io track started state and defer async I/O after initial thermal control 2026-09-07 10:15:13 +02:00
Andrea Mazzoleni
f9819266e7 Abort cooldown sleep and break caller loops immediately on interruption 2026-09-06 23:37:05 +02:00
Andrea Mazzoleni
719bc5a3d5 Persist content state after parity handles are closed in scrub 2026-09-04 08:47:41 +02:00
Andrea Mazzoleni
0ce89aa35d Add support for selectable streaming vs cached parity generation 2026-09-02 17:26:02 +02:00
Andrea Mazzoleni
472c85a4fb Centralize canonical SnapRAID block hashing semantics 2026-08-31 20:45:38 +02:00
Andrea Mazzoleni
cea7ce7f0a Document non-obvious invariants across sync, check, scrub, parity, and handle mapping logic 2026-08-31 10:39:17 +02:00
Andrea Mazzoleni
fcb6a5ca91 Quiesce asynchronous read-ahead I/O before thermal cooldown in dry and scrub 2026-08-26 21:11:46 +02:00
Andrea Mazzoleni
f453a72369 Preserve recovery state until a full clean sync completes 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
1015e2a6c5 Remove duplicate scrub parity mismatch diagnostic 2026-08-18 23:33:57 +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
58fece3584 Extend io_init() to support arbitrary combinations of data and parity operations 2026-08-18 23:33:53 +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
6e2e11d9b1 Log using log_error all errors that are not resulting in an early termination 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
cf452a091d Log using log_error all errors that are not resulting in an early termination 2026-06-03 12:33:29 +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
c2969f11ba Give a reasonable value to blockcur in case of alert failure 2026-05-21 16:08:03 +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
11fd4ada69 Support decimal point for -p, --plan
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-02-17 02:02:48 +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
d5b5a9bcbf More efficient info bucket management
Logged at every state_read() and state_write()
2026-02-09 14:39:19 +01:00
Andrea Mazzoleni
83b1c9bf3b Print Everything OK also if nothing was processed 2026-02-09 14:39:19 +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
85f3f0217c Change some progress notifications to msg_progress from msg_info 2026-02-01 18:26:27 +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
caf9cd3961 Review all the error messages 2026-01-25 11:14:29 +01:00
Andrea Mazzoleni
94e71365b8 Use "warning" for less relevant errors in the final exit status 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
276b06f0a6 Extend the log error tags to differentiate between io/silent to generic errors
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 / Analyze (push) Waiting to run
2026-01-14 01:45:32 +01:00
Andrea Mazzoleni
928469bc3d Avoid some warnings reported with higher optimization 2026-01-11 12:01:12 +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
Andrea Mazzoleni
0d6792d4ed Clearify a scrub message 2022-12-05 12:13:40 +01:00
Andrea Mazzoleni
7ce88e5f18 Remove unncessary assignment 2021-05-25 13:32:26 +02:00