Commit graph

134 commits

Author SHA1 Message Date
Andrea Mazzoleni
3b79e21c2f Document scan phase invariants 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
d5d999f11d Fix modified hardlink inode tracking during scan 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
c1fa9e23b6 Remove legacy in-place mtime_nsec migration in multithread scanner 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
30417d57a5 Exclude snapshot directory only when snapshot mode is enabled 2026-08-18 23:33:57 +02:00
Andrea Mazzoleni
f818d9426b Remove libblkid support and build dependency 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
4ebdfe8c8f Defer deallocation of modified files to phase 2 to prevent copy-detection races 2026-08-18 23:33:56 +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
99530c9946 Automatically exclude the snapshot .snapraid directory and content files 2026-08-18 23:33:53 +02:00
Andrea Mazzoleni
2e71602267 Remove the requirement to snapshot content files
The new content file format now includes metadata for previous versions
of files. This allows the fix command to access historical file data from
snapshots as needed, ensuring recovery even if the live filesystem has
changed or the file was deleted during a sync.
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
2fc38017a8 Add Btrfs snapshot support for atomic sync and recovery consistency 2026-08-18 23:33:52 +02:00
Andrea Mazzoleni
ea37d5a38b More informational error level messages
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-08-04 09:46:55 +02:00
Andrea Mazzoleni
af0b3c8451 Add a new informational error level for messages 2026-08-04 09:46:55 +02:00
Andrea Mazzoleni
952ea337e7 Protect candidate file copy under stamp_lock during multithread scan 2026-07-06 17:01:34 +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
e09e55a01b Comment about the FILE_IS_RELOCATED flag protection 2026-05-21 10:29:47 +02:00
Andrea Mazzoleni
5731f3caf3 Add log of error during scan 2026-05-14 15:26:25 +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
c449864fc7 Introduce "relocated" state to unify and replace "copied/removed" logic 2026-03-15 02:47:36 +01:00
Andrea Mazzoleni
b3879f7f8e Rework the portable support 2026-03-02 09:56:27 +01:00
Andrea Mazzoleni
4c7fd01b7b Do not log the exit tag in scan, only in diff
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-10 23:15:49 +01:00
Andrea Mazzoleni
627b7cff50 New gui options to have a better integration 2026-02-10 12:16:50 +01:00
Andrea Mazzoleni
03fb7d3cff Log begin and end markers for scan and bucket listing 2026-02-09 23:52:10 +01:00
Andrea Mazzoleni
025816d151 Speed up the status command
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-02 18:00:14 +01:00
Andrea Mazzoleni
60bd71d184 Log new block_unsynced and block_unscrubbed counter 2026-02-02 18:00:14 +01:00
Andrea Mazzoleni
3732800a0b In sync message if the parity is invalid 2026-02-01 23:21:38 +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
9f081f9c22 Log the filesystem type and label
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-29 19:34:33 +01:00
Andrea Mazzoleni
6b79b3157d Splitted the --gui option in --gui and --gui-verbose to avoid extremely big logs 2026-01-14 10:49:23 +01:00
Andrea Mazzoleni
36cef9ee89 New .snapraidignore feature 2026-01-11 12:07:01 +01:00
Andrea Mazzoleni
93f424768b Remove unused variable 2024-06-05 10:14:50 +02:00
Andrea Mazzoleni
a605442c8c Fix typos in messages 2023-12-09 15:35:45 +01:00
Andrea Mazzoleni
02d170c004 Remove all scan buffers from the stack
This reduces even more the stack utilization.
2022-01-09 10:23:09 +01:00
Andrea Mazzoleni
b9721747c5 Reduce stack allocation in dir scanning
This allow to work in environments with low stack size, like MUSL that has only 128K.
2022-01-09 09:06:18 +01:00
Andrea Mazzoleni
96cff859ce Remove unnecessary #if 2022-01-07 21:53:12 +01:00
Andrea Mazzoleni
1d4fbd3f9a Add the option --test-skip-multi-scan to skip multithreads scan 2022-01-07 21:03:51 +01:00
Andrea Mazzoleni
bc2d8ee6a5 Use proper locking when printing diff lines in Windows
Windows requires a lock to avoid to mixup lines.
2021-12-01 18:00:07 +01:00
Andrea Mazzoleni
b0f85b54b1 Remove warning when built without thread support 2021-11-29 17:31:52 +01:00
Andrea Mazzoleni
3478a95add Print time for scanning 2021-11-29 16:51:11 +01:00
Andrea Mazzoleni
f31395dffb Add support for parallel disk scanning 2021-11-28 16:20:00 +01:00
Andrea Gelmini
986e9b4131 Fix typos 2020-05-26 12:50:15 +02:00
Andrea Mazzoleni
713a8138c0 Minor formatting changes 2017-11-03 23:46:45 +01:00