Commit graph

1293 commits

Author SHA1 Message Date
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
2a60279674 Avoid strlen in deferred pathset insertion by pre-caching path hash in pathset.index 2026-10-06 09:17:23 +02:00
Andrea Mazzoleni
143813a90e Store initial file path inline with struct snapraid_file 2026-10-05 15:41:01 +02:00
Andrea Mazzoleni
9f24ca00d1 Use atomic operations instead of mutex for memory allocation counter 2026-10-05 15:41:01 +02:00
Andrea Mazzoleni
8589327114 Defer file hash table insertions and pre-reserve bucket capacity in state_read_content 2026-10-05 15:41:01 +02:00
Andrea Mazzoleni
0d2f466b11 Count unsynced blocks using an extent event sweep instead of per-block lookups 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
969cb5ca31 Make sgetbs() return the number of characters read on success 2026-10-05 15:41:01 +02:00
Andrea Mazzoleni
97419fb67f Cache BLOCK_HASH_SIZE in local variable in block run read and write loops 2026-10-05 14:04:15 +02:00
Andrea Mazzoleni
94c7d3ef9a Avoid memory preinitialization in malloc_nofail and use calloc directly in calloc_nofail 2026-10-05 14:04:15 +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
91761768a0 Document rare occurrence of missing info branch in content loading 2026-10-05 00:11:51 +02:00
Andrea Mazzoleni
0ad0913ef2 Use os_tick_ns() monotonic timer and add compiler memory barriers
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-02 11:09:42 +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
5b402fc462 Normalize legacy out-of-range content nanoseconds to STAT_NSEC_INVALID 2026-10-01 08:43:59 +02:00
Andrea Mazzoleni
edb3cacb77 Optimize hash performance with custom unroll 2026-10-01 00:43:48 +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
eb75cef0fe Avoid touch failing on missing files deleted or moved since the last sync 2026-09-30 16:07:36 +02:00
Andrea Mazzoleni
2a2b876fef Reject incomplete ZFS device lists when zpool status fails
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-28 21:39:41 +02:00
Andrea Mazzoleni
6f74455864 Reject negative and out-of-range values in non-negative integer parsing 2026-09-28 21:05:56 +02:00
Andrea Mazzoleni
99a79b7049 Avoid modifying existing pool entries when symlink creation finds a conflict 2026-09-28 16:35:47 +02:00
Andrea Mazzoleni
28aae9d289 Use 64-bit block counters for the status scrub graph 2026-09-28 16:22:56 +02:00
Andrea Mazzoleni
aa8445e7a9 Report smartctl open failures as unknown power state 2026-09-28 15:57:11 +02:00
Andrea Mazzoleni
720073d80d Skip inaccessible disks and parity levels in device operations 2026-09-28 15:34:54 +02:00
Andrea Mazzoleni
316a9cf135 Show N/A for impossible SMART parity configurations 2026-09-28 15:09:55 +02:00
Andrea Mazzoleni
57e15416ae Abort spindown when filesystem flush fails 2026-09-28 15:09:55 +02:00
Andrea Mazzoleni
d210e95997 Avoid touch hiding files modified since the last sync 2026-09-28 14:11:51 +02:00
Andrea Mazzoleni
087781cee9 Reject parity split layouts exceeding INT64_MAX total size 2026-09-28 14:11:51 +02:00
Andrea Mazzoleni
c2be8536bf Reject non-regular data and parity files after opening 2026-09-28 11:54:11 +02:00
Andrea Mazzoleni
8f0bc80774 Preserve .snapraidignore candidates during array recovery search with nohidden 2026-09-28 11:52:08 +02:00
Andrea Mazzoleni
bff4bb237b Avoid truncating untracked file tails during partial fix 2026-09-28 11:37:58 +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
11b17d7d04 Make filesystem snapshot renames durable before parity updates
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-27 23:52:31 +02:00
Andrea Mazzoleni
cd8b331a30 Document why automatic copy search runs before snapshot selection
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-27 20:17:26 +02:00
Andrea Mazzoleni
e7135d101b Validate hardlink entries without following symbolic links during check and fix
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-27 11:31:35 +02:00
Andrea Mazzoleni
0138b48023 Avoid recreating missing files and directories during fix with syncedonly (-e/-b) 2026-09-26 18:17:25 +02:00
Andrea Mazzoleni
6b8d3e23a0 Drop support for pre-SnapRAID 11 content formats and require migration with SnapRAID 14.x 2026-09-26 17:15:09 +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
0440d74fb5 Detect Bcachefs subvolume roots using STATX_SUBVOL instead of assuming inode 4096 2026-09-25 23:24:27 +02:00
Andrea Mazzoleni
a6a1cec115 Resolve ZFS dataset mounts through mountinfo, including legacy mountpoints 2026-09-25 22:51:55 +02:00
Andrea Mazzoleni
1aa6d2b787 Reject content files with parity split sizes not aligned to the configured block size 2026-09-25 17:19:40 +02:00
Andrea Mazzoleni
5b0a8e0c8e Restore file mtime after synced-only recovery writes 2026-09-25 10:48:56 +02:00
Andrea Mazzoleni
46dbfa9b08 Reject parity disk filters combined with file selection filters 2026-09-25 10:22:07 +02:00
Andrea Mazzoleni
7662b80023 Keep automatic array search within data-disk filesystem boundaries 2026-09-25 10:14:36 +02:00
Andrea Mazzoleni
ce7d29f178 Keep hardlink target files selected with selected hardlinks 2026-09-25 10:08:57 +02:00
Andrea Mazzoleni
13267085d1 Fail closed on invalid .snapraidignore control files 2026-09-25 09:44:09 +02:00
Andrea Mazzoleni
099f3c7429 Use DT_* values directly for scan entry types 2026-09-25 09:44:09 +02:00
Andrea Mazzoleni
a92b19d9c2 Use lstat for empty objects and leave type mismatches unrecoverable 2026-09-25 08:48:43 +02:00
Andrea Mazzoleni
69967b1262 Exclude blockless objects from filter-error selection 2026-09-25 08:24:50 +02:00