Commit graph

134 commits

Author SHA1 Message Date
Andrea Mazzoleni
4a9871d087 Use mulhash for integer keys while retaining inthash_u64 on 32-bit architectures
Some checks failed
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-arm32 (push) Has been cancelled
Build / build-win (push) Has been cancelled
Build / build-freebsd (push) Has been cancelled
Build / build-musl (push) Has been cancelled
CodeQL Advanced / Analyze (c-cpp) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
2026-10-15 15:35:31 +02:00
Andrea Mazzoleni
88c54f041e Update to TommyDS v4.0 2026-10-15 15:35:31 +02:00
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
8fe9331f42 Limit unsynced parity sweep to the invalid window tracked during content parsing
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-06 10:49:24 +02:00
Andrea Mazzoleni
143813a90e Store initial file path inline with struct snapraid_file 2026-10-05 15:41:01 +02:00
Andrea Mazzoleni
3d7a722ab2 Avoid redundant strlen and duplicate traversals when loading content strings 2026-10-05 15:41:01 +02:00
Andrea Mazzoleni
ec71f519b0 Align critical loops to 64 bytes using __align_loops attribute 2026-10-05 14:04:12 +02:00
Andrea Mazzoleni
0b930b8a31 Add unique descriptive log_fatal messages with field names to all decoding_error calls
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-01 09:30:38 +02:00
Andrea Mazzoleni
426f6dc0bc Treat ENOTDIR as missing file in filter_existence and handle_open_create
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-30 16:07:36 +02:00
Andrea Mazzoleni
7decc78c97 Apply filters to empty directories during scan and match subdirectories in directory rules 2026-09-28 11:31:56 +02:00
Andrea Mazzoleni
f80e93e9d3 Keep disks with pending deallocation records mapped in the content file 2026-09-26 16:37:43 +02:00
Andrea Mazzoleni
b023939c6b Track current and previous hash generations for deallocated blocks
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-26 00:02:24 +02:00
Andrea Mazzoleni
78abc2c7b7 Limit maximum consecutive newlines in uncrustify configuration 2026-09-14 22:33:23 +02:00
Andrea Mazzoleni
902c19b668 Specialize block hash copies for the full hash size 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
03545f1685 Resolve file-to-parity mappings once per extent while writing content 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
17b24c8d21 Allocate content extents by run instead of by block 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
b14f703d2b Avoid redundant block initialization when loading content files 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
db94550cd7 Remove physical offset sorting support and default to directory order 2026-09-07 22:15:45 +02:00
Andrea Mazzoleni
12c41ff1d1 Implement two-phase file scan with dedicated discovery struct and volatile hardlink normalization 2026-09-07 22:15:45 +02:00
Andrea Mazzoleni
c9fbc058ef Fix reversed content-suffix matching direction in filter_content 2026-09-07 15:21:53 +02:00
Andrea Mazzoleni
395291bd9a Implement crash-safe --force-full sync with persistent BLOCK_STATE_REBUILD 2026-08-31 10:39:17 +02:00
Andrea Mazzoleni
237c9f0497 Enforce BLOCK_MAX limits on both 32-bit and 64-bit builds 2026-08-27 16:29:34 +02:00
Andrea Mazzoleni
fa81c20ee6 Preserve leading slash context for absolute double-star filters 2026-08-26 21:11:46 +02:00
Andrea Mazzoleni
c7b8068e36 Fix 32-bit integer truncation in block metadata allocations and file_block 2026-08-26 21:11:46 +02:00
Andrea Mazzoleni
527bd69129 Reject unterminated wildcard character classes in filter allocation 2026-08-26 16:46:10 +02:00
Andrea Mazzoleni
76e8ae2498 Allow path components with three or more dots in filter patterns 2026-08-26 16:26:42 +02:00
Andrea Mazzoleni
f75827281f Reject empty disk filter patterns in filter_alloc_disk 2026-08-26 16:26:42 +02:00
Andrea Mazzoleni
d4dc5a7339 Reject standalone absolute directory filter pattern /**/ during parsing 2026-08-26 16:26:42 +02:00
Andrea Mazzoleni
3bd3eff451 Reject root directory pattern '/' in file filter allocation 2026-08-26 12:37:29 +02:00
Andrea Mazzoleni
78e87549ca Improve directory scan filesystem boundary detection using statx() for mount and subvolume IDs 2026-08-26 09:21:24 +02:00
Andrea Mazzoleni
4f286a2faa Document fs_allocate behavior, performance rationale, and invariant checks 2026-08-26 09:21:24 +02:00
Andrea Mazzoleni
30f78a4190 Fix fs_check validation omission on the final file in fs_file extent tree 2026-08-26 09:21:24 +02:00
Andrea Mazzoleni
fd65dbd9ea Fix undefined behavior by making TommyDS foreach callback signatures take void*
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
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
2026-08-24 23:03:00 +02:00
Andrea Mazzoleni
3185e1bf34 Fix undefined behavior in extent file comparison by casting pointers to uintptr_t 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
9255157519 Fix per-file block index overflow beyond 32 bits 2026-08-18 23:33:57 +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
bbcdb72a9f Introduce nalloc_nofail 2026-08-18 23:33:55 +02:00
Andrea Mazzoleni
3484965b89 Align data disk UUID validation and write logic with parity splits using content_uuid 2026-08-18 23:33:55 +02:00
Andrea Mazzoleni
133e527643 Add support for specifying case-insensitive SMART attribute names in the smartignore option 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
52f7c2184f Add support for custom smartctl info options using a [info: ...] tag 2026-08-18 23:33:54 +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
ec9ddb474a Rework snapshot interface 2026-08-18 23:33:53 +02:00
Andrea Mazzoleni
16b08201a4 Add Bcachefs support 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
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