Commit graph

86 commits

Author SHA1 Message Date
Andrea Mazzoleni
c2be8536bf Reject non-regular data and parity files after opening 2026-09-28 11:54:11 +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
5f68fda7ae Propagate non-capacity errors during parity split growth 2026-09-24 21:52:42 +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
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
2b784748e3 Propagate final writeback errors from advise_close 2026-09-09 21:25:32 +02:00
Andrea Mazzoleni
62ae6c3552 Replace physical reach tracking with the natural file and parity EOF
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-09 13:03:11 +02:00
Andrea Mazzoleni
76dd3d28ea Clarify physical_reach_size semantics and non-contiguous parity holes left by fix 2026-09-08 13:36:51 +02:00
Andrea Mazzoleni
1c9e5df479 Truncate parity splits backwards from the tail to preserve intermediate split boundaries 2026-09-07 22:15:45 +02:00
Andrea Mazzoleni
8ed0224e41 Use F_FULLFSYNC on macOS with fallback to fsync for full barrier durability 2026-09-05 10:39:07 +02:00
Andrea Mazzoleni
5381d0a1ee Sync parent directory of parity split files in parity_sync 2026-09-04 12:24:25 +02:00
Andrea Mazzoleni
6cd217ec2b Add O_NOFOLLOW to parity file open/create paths to prevent symlink redirection 2026-08-31 21:34:10 +02:00
Andrea Mazzoleni
2774a6488f Enforce contiguous prefix invariant for parity splits and reject internal zero-sized splits 2026-08-31 10:39:17 +02:00
Andrea Mazzoleni
f8319361a3 Disallow elastic parity split reallocation during fix to preserve persisted layout 2026-08-31 10:39:17 +02:00
Andrea Mazzoleni
cea7ce7f0a Document non-obvious invariants across sync, check, scrub, parity, and handle mapping logic 2026-08-31 10:39:17 +02:00
Andrea Mazzoleni
793782fa2d Fix premature valid_size update before pwrite completion in parity_write 2026-08-31 10:39:17 +02:00
Andrea Mazzoleni
6d4c4925f4 Add unsigned literal suffixes to constants 2026-08-18 23:33:59 +02:00
Andrea Mazzoleni
4423c8c895 Detect truncated parity using the contiguous valid physical prefix 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
fa0a77f84c Add missing esc_tag() in status and parity split log tags 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
091e44afed Handle short writes and EINTR in sflush, handle_write, and parity_write 2026-08-18 23:33:58 +02:00
Andrea Mazzoleni
00b4cbafd0 Merge the CLI and Daemon portable interface 2026-08-18 23:33:55 +02:00
Andrea Mazzoleni
54602422dd Change commenting style 2026-08-18 23:33:52 +02:00
Andrea Mazzoleni
5cfebba19e Remove unnecessary log argument 2026-06-03 20:57:08 +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
65a20f48c6 Ensure to advising the remaining of the file when it's closed
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (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-05-21 00:41:37 +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
60bd71d184 Log new block_unsynced and block_unscrubbed counter 2026-02-02 18:00:14 +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
f134201438 Log more information about the filesystems 2026-01-31 16:30:15 +01:00
Andrea Mazzoleni
e743e23555 Add support for short writes to files. It should not happen, but just to be sure.
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (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-01-25 11:29:41 +01:00
Andrea Mazzoleni
caf9cd3961 Review all the error messages 2026-01-25 11:14:29 +01:00
Allan Clark
5886923bb1 Add bandwidth limit feature --bw-limit 2025-03-29 19:29:55 +01:00
Andrea Mazzoleni
a605442c8c Fix typos in messages 2023-12-09 15:35:45 +01:00
Andrea Gelmini
986e9b4131 Fix typos 2020-05-26 12:50:15 +02:00
Andrea Mazzoleni
9a21995a61 Split the parity close and truncate operations
To avoid any possible conflicts.
2019-06-04 19:28:43 +02:00
Andrea Mazzoleni
a873eee208 Improve parity fixing speed 2019-05-19 10:04:53 +02:00
Andrea Mazzoleni
54015a2df8 Add some more logging in case of failure of parity resize 2017-11-24 23:02:45 +01:00
Andrea Mazzoleni
68563650c9 Use fallocate() with an offset starting at the missing data
This works better with Btrfs.
2017-11-24 23:02:41 +01:00
Andrea Mazzoleni
713a8138c0 Minor formatting changes 2017-11-03 23:46:45 +01: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
cb84c61d07 Extend the coverage test 2016-11-06 20:23:11 +01:00
Andrea Mazzoleni
8de78a8b9f Use portable format specified for printf
Otherwise they raise a warning when building for x64.
2016-11-06 15:52:14 +01:00
Andrea Mazzoleni
ba0184c37c Add a test option to skip the space holder 2016-10-05 00:12:29 +02:00
Andrea Mazzoleni
a61c415d39 Fix printing of outofparity message 2016-10-02 00:06:48 +02:00
Andrea Mazzoleni
eb039e8186 Print the outofparity explanation at the end
Otherwise it could scroll away.
2016-09-30 18:40:54 +02:00
Andrea Mazzoleni
3bdc9b93ad Add additional checks on parity size
Ensures that it's always aligned at the block size.
Also adds more comments about resizing process.
2016-09-28 20:32:50 +02:00
Andrea Mazzoleni
422d642591 Check that the parity was fully allocated
We must check if any remaining size is left to be
allocated.
2016-09-28 18:55:50 +02:00
Andrea Mazzoleni
85df40f40d Clarify about the space holder for Windows
In Windows we keep 256 MB to avoid warnings.
2016-08-31 22:26:17 +02:00
Andrea Mazzoleni
5911da55c0 In Windows leave 256 MB of free space in the parity disk
This is done to avoid the annoying warning message of
disk full.
2016-07-27 23:06:59 +02:00