Commit graph

351 commits

Author SHA1 Message Date
Andrea Mazzoleni
8a5b2adb75 Remove unused checked_read state flag
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-18 11:23:04 +02:00
Andrea Mazzoleni
a0d6bc288a Fix touch abort before the first sync when no content file exists 2026-10-18 11:07:41 +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
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
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
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
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
6f74455864 Reject negative and out-of-range values in non-negative integer parsing 2026-09-28 21:05:56 +02:00
Andrea Mazzoleni
087781cee9 Reject parity split layouts exceeding INT64_MAX total size 2026-09-28 14:11:51 +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
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
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
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
69967b1262 Exclude blockless objects from filter-error selection 2026-09-25 08:24:50 +02:00
Andrea Mazzoleni
bcc06e10c6 Reject parity sizes exceeding data_off_t range and remove redundant block size casts 2026-09-24 20:40:27 +02:00
Andrea Mazzoleni
bcfd2734b6 Quiesce scrub read-ahead before autosave and distinguish read/write barriers 2026-09-24 19:49:46 +02:00
Andrea Mazzoleni
5b615a0e02 Emit content_data and content_parity tags only after durable content rename in state_write
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-22 09:25:08 +02:00
Andrea Mazzoleni
c6951393e8 Exit code and logging invariants for log_fatal and hardware log_error
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-21 17:27:07 +02:00
Andrea Mazzoleni
c2d46f4039 Emit content tags only after updating disk mapping and checks 2026-09-20 14:11:35 +02:00
Andrea Mazzoleni
8e66b42ceb Add trim and trim_empty support to strsplit and update all callers 2026-09-19 21:36:34 +02:00
Andrea Mazzoleni
2a4335ef7d Defer content_info logging and state counters update after content durability rename in state_write
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-18 10:00:42 +02:00
Andrea Mazzoleni
601064dde7 Use pathcmp for disk name comparisons to enforce case-insensitive uniqueness on Windows 2026-09-18 10:00:42 +02:00
Andrea Mazzoleni
3f3e7d4483 Validate logical disk names in configuration parsing to ensure compatibility with snapraid-daemon 2026-09-18 10:00:41 +02:00
Andrea Mazzoleni
bdc2da9a94 Report elapsed time when loading and saving state 2026-09-18 10:00:41 +02:00
Andrea Mazzoleni
8b9858ffdc Synchronizes log entries for errors
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-15 23:55:21 +02:00
Andrea Mazzoleni
215aed17e7 Emit content read metadata only after successful content loading
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-09-14 23:26:54 +02:00
Andrea Mazzoleni
78abc2c7b7 Limit maximum consecutive newlines in uncrustify configuration 2026-09-14 22:33:23 +02:00
Andrea Mazzoleni
c1bcd6a24f Migrate Windows smartctl execution from _wpopen to os_popen and direct process spawning 2026-09-14 18:03:35 +02:00
Andrea Mazzoleni
08863cd740 Print progress message after saving content files when multithreading is disabled 2026-09-13 21:15:37 +02:00
Andrea Mazzoleni
15048ff14f Optimize hardware CRC32C using multiple lanes 2026-09-11 09:27:42 +02:00
Andrea Mazzoleni
787fc020e6 Process content info values in contiguous runs 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
badff9d548 Skip unsynced block counting for synchronized content 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
902c19b668 Specialize block hash copies for the full hash size 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
b64c28b537 Serialize deleted blocks by ordered parity extents 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
6b5b0098c7 Detect rebuild blocks during state preparation 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
31f44958a3 Avoid redundant unsynced block scans when writing content 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
1073c97e0a Skip extent locking during single-threaded content serialization 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
d8ea998eb2 Support native advise modes in buffered streams 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
b762ab9e73 Update timed multithreaded content writers 2026-09-10 23:51:30 +02:00
Andrea Mazzoleni
1b0fa3eb46 Write content block hashes in buffered runs 2026-09-10 23:51:30 +02:00