Andrea Mazzoleni
4a37e3fece
Change the BLOCK_HASH_SIZE type to avoid potential overflow
2026-08-18 23:33:53 +02:00
Andrea Mazzoleni
76ce1cbb16
Add regression check for Btrfs
...
It requires root privileges as it has to create Btrfs filesystems.
2026-08-18 23:33:52 +02:00
Andrea Mazzoleni
275063d23c
Track deallocated files in the content file for parity recovery
...
Add a new 'dealloc' list per disk to record files that were removed
or modified during a scan. This list is saved in the content file
(new format version SNAPCNT4) so that past parity contributions of
those files can be imported from previous snapshots.
2026-08-18 23:33:52 +02:00
Andrea Mazzoleni
54602422dd
Change commenting style
2026-08-18 23:33:52 +02:00
Andrea Mazzoleni
1227a8c45e
Sync no longer requires clearing the past hash
...
It no longer assumes past hashes are valid if even a single unsynced
block exists, which indicates a previous sync was interrupted.
While this makes syncing slower after an interruption, it preserves the
past hash in the content file, enabling a more reliable fix if a
disk fails following an incomplete sync.
This ensures the --import option remains functional even after an
interrupted sync.
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
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
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
492ad40f2c
Simpler handling of skip_sync
2026-05-21 16:08:03 +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
5dfeaf0ef6
Return with an error code if the there is a thermal alert that prevent starting
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
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
622b796208
Rename error counters
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
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
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
e9756461af
Failing to flush is an I/O error
2026-01-16 10:05:31 +01:00
Andrea Mazzoleni
276b06f0a6
Extend the log error tags to differentiate between io/silent to generic errors
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
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
...
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
30474cfb80
Ensure that writer buffers are flushed before synchronizing parity writes
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
2025-09-25 15:32:34 +02:00
Andrea Mazzoleni
a605442c8c
Fix typos in messages
2023-12-09 15:35:45 +01: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
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
BlueBlock
72924c6d34
Fix a typo in a message
2018-09-25 22:27:20 +02:00
Andrea Mazzoleni
b9740e06f4
Print filenames in the stats screen
2017-11-24 22:17:24 +01:00
Andrea Mazzoleni
713a8138c0
Minor formatting changes
2017-11-03 23:46:45 +01:00
Andrea Mazzoleni
61a1e7a7e6
Use casting when printing value that may be of a different type
...
The stat struct could use whatever type for st_* fields.
2017-10-27 22:54:42 +02:00
Andrea Mazzoleni
bb3a4a54a1
When printing the diff bits, also tell how many in total
2016-11-27 20:57:22 +01:00
Andrea Mazzoleni
cb84c61d07
Extend the coverage test
2016-11-06 20:23:11 +01:00
Andrea Mazzoleni
ba0184c37c
Add a test option to skip the space holder
2016-10-05 00:12:29 +02:00
Andrea Mazzoleni
b1fc75adab
Make -F to not reallocate parity
...
This is now done by the new -R option.
2016-10-01 22:19:29 +02:00
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
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
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
21241c5078
Preliminary advise support
2016-05-15 14:50:59 +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