Commit graph

124 commits

Author SHA1 Message Date
Andrea Mazzoleni
3ce5a5b4e5 Merge the CLI and Daemon portable interface 2026-07-13 11:03:57 +02:00
Andrea Mazzoleni
5aa1563675 Further conversions from 32 to 64 bits 2026-07-13 11:03:56 +02:00
Andrea Mazzoleni
a580273265 Migrate block_off_t to 64-bit with updated CLI parsing, VLQ serialization, and format specifiers 2026-07-13 11:03:56 +02:00
Andrea Mazzoleni
cf1508489f Automatically exclude the snapshot .snapraid directory and content files 2026-07-13 11:03:56 +02:00
Andrea Mazzoleni
20cdfa7535 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-07-13 11:03:55 +02:00
Andrea Mazzoleni
69d467e9ef 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-07-13 11:03:55 +02:00
Andrea Mazzoleni
21673eb805 Change commenting style 2026-07-13 11:03:55 +02:00
Andrea Mazzoleni
dd0ded0be5 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-07-13 11:03:55 +02:00
Andrea Mazzoleni
e9871d65ff Add Btrfs snapshot support for atomic sync and recovery consistency 2026-07-13 11:03: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
Andrea Mazzoleni
f778fb691f Apply new hardlink behaviour also to NTFS in nix platforms
This is a specific NTFS behaviour, not limited to Windows.
2017-10-29 18:43:53 +01:00
Andrea Mazzoleni
2a8f963707 Fix recognition of Windows hardlinks
In Windows hardlinks may have different time and size attributes
reported by FindFirst. This is persistent until the link is opened.
2017-10-27 22:59:14 +02: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
475bcf17f8 Clarify the message about the conseguence of missing UUID
This should be less scary to users.
2016-11-14 20:29:27 +01:00
Andrea Mazzoleni
29fb2b22a2 Explain why errno is set to 0 2016-09-23 16:46:54 +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
32a57a5808 Apply filters also to empty dir
Doesn't always include them when using filter options.
2016-05-15 14:27:35 +02:00
Andrea Mazzoleni
69efbf264a Quote file path in fix messages 2016-05-15 14:27:35 +02:00