Leave block empty for unlocalized close errors and use zero for parity open 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

This commit is contained in:
Andrea Mazzoleni 2026-09-23 16:25:32 +02:00
parent 1a5b28ad38
commit 222136f1e7
7 changed files with 157 additions and 73 deletions

View file

@ -1952,23 +1952,32 @@ These tags report specific errors that occur on data disks during the
commands that access files and parities.
.TP
.B error[_io|_data]:<block>:<disk_name>:<file>:<msg>
Logs file access errors (open, read, file changed) during the
data disk read operation for parity calculation or verification.
Logs errors affecting data files.
.PP
.RS 4
With no suffix, \`error\` indicates a soft or logical error not
classified as a hardware I/O or silent data error.
.RE
.RS 4
.PD 0
.HP 4
.I _io
Indicates a physical Input/Output error.
The disk was unable to read or write a specific block,
typically signaling a failing sector or cable issue.
Indicates a physical Input/Output error, typically
signaling a failing sector, device, or cable issue.
.HP 4
.I _data
Indicates the data was read successfully but failed
the checksum/hash verification. This signals \`silent\`
Indicates data that was read successfully but failed
the checksum/hash verification, signaling \`silent\`
corruption or an unsuccessful parity match.
.HP 4
.I <block>
The zero\-based index of the block where the error occurred (uint).
The zero\-based SnapRAID parity position associated with
the error (uint). It identifies the logical position affected
by the failed operation, not necessarily the physical sector
that caused the failure. Data file open/create errors occurring
while processing a position report the current block. The field
is empty when the error cannot be associated with a specific
position, such as for close errors.
.HP 4
.I <disk_name>
The name of the data disk.
@ -1985,22 +1994,30 @@ error (e.g., \`Open/Read/Write error\`,
.RE
.TP
.B parity_error[_io|_data]:<block>:<level>:<msg>
Logs errors during parity disk read or write operations.
Logs errors affecting parity.
.PP
.RS 4
With no suffix, \`parity_error\` indicates a soft or logical error
not classified as a hardware I/O or silent data error.
.RE
.RS 4
.PD 0
.HP 4
.I _io
Indicates a physical Input/Output error.
The disk was unable to read or write a specific block,
typically signaling a failing sector or cable issue.
Indicates a physical Input/Output error, typically
signaling a failing sector, device, or cable issue.
.HP 4
.I _data
Indicates the data was read successfully but failed
the checksum/hash verification. This signals \`silent\`
corruption or an unsuccessful parity match.
Indicates data that was read successfully but failed
the parity verification, signaling \`silent\` corruption.
.HP 4
.I <block>
The zero\-based index of the block where the error occurred (uint).
The zero\-based SnapRAID parity position associated with
the error (uint). Parity open/create errors report block 0 as
a retry marker; this does not mean that parity block 0 is bad.
Parity access is attempted again by subsequent commands. The
field is empty when the error cannot be associated with a
specific position, such as for close errors.
.HP 4
.I <level>
The configuration name of the parity level (e.g.,
@ -2008,7 +2025,7 @@ The configuration name of the parity level (e.g.,
.HP 4
.I <msg>
A descriptive message indicating the nature of the
error (e.g., \`Read/Write error\`,
error (e.g., \`Open/Read/Write error\`,
\`Data error, diff bits <diff>/<bits>\`).
.PD
.RE

View file

@ -1230,16 +1230,23 @@ Error Tags
commands that access files and parities.
=error[_io|_data]:<block>:<disk_name>:<file>:<msg>
Logs file access errors (open, read, file changed) during the
data disk read operation for parity calculation or verification.
Logs errors affecting data files.
_io - Indicates a physical Input/Output error.
The disk was unable to read or write a specific block,
typically signaling a failing sector or cable issue.
_data - Indicates the data was read successfully but failed
the checksum/hash verification. This signals `silent`
With no suffix, `error` indicates a soft or logical error not
classified as a hardware I/O or silent data error.
_io - Indicates a physical Input/Output error, typically
signaling a failing sector, device, or cable issue.
_data - Indicates data that was read successfully but failed
the checksum/hash verification, signaling `silent`
corruption or an unsuccessful parity match.
<block> - The zero-based index of the block where the error occurred (uint).
<block> - The zero-based SnapRAID parity position associated with
the error (uint). It identifies the logical position affected
by the failed operation, not necessarily the physical sector
that caused the failure. Data file open/create errors occurring
while processing a position report the current block. The field
is empty when the error cannot be associated with a specific
position, such as for close errors.
<disk_name> - The name of the data disk.
<file> - The path (relative to the disk mount point) of the
file containing the block (escaped).
@ -1248,19 +1255,25 @@ Error Tags
`Data error at position <pos>, diff bits <diff>/<bits>`).
=parity_error[_io|_data]:<block>:<level>:<msg>
Logs errors during parity disk read or write operations.
Logs errors affecting parity.
_io - Indicates a physical Input/Output error.
The disk was unable to read or write a specific block,
typically signaling a failing sector or cable issue.
_data - Indicates the data was read successfully but failed
the checksum/hash verification. This signals `silent`
corruption or an unsuccessful parity match.
<block> - The zero-based index of the block where the error occurred (uint).
With no suffix, `parity_error` indicates a soft or logical error
not classified as a hardware I/O or silent data error.
_io - Indicates a physical Input/Output error, typically
signaling a failing sector, device, or cable issue.
_data - Indicates data that was read successfully but failed
the parity verification, signaling `silent` corruption.
<block> - The zero-based SnapRAID parity position associated with
the error (uint). Parity open/create errors report block 0 as
a retry marker; this does not mean that parity block 0 is bad.
Parity access is attempted again by subsequent commands. The
field is empty when the error cannot be associated with a
specific position, such as for close errors.
<level> - The configuration name of the parity level (e.g.,
`parity`, `2-parity`).
<msg> - A descriptive message indicating the nature of the
error (e.g., `Read/Write error`,
error (e.g., `Open/Read/Write error`,
`Data error, diff bits <diff>/<bits>`).
=hardlink_error[_io]:<disk_name>:<link_path>:<target_path>:<msg>

View file

@ -1282,16 +1282,23 @@ These tags report specific errors that occur on data disks during the
commands that access files and parities.
error[_io|_data]:<block>:<disk_name>:<file>:<msg>
Logs file access errors (open, read, file changed) during the
data disk read operation for parity calculation or verification.
Logs errors affecting data files.
_io - Indicates a physical Input/Output error.
The disk was unable to read or write a specific block,
typically signaling a failing sector or cable issue.
_data - Indicates the data was read successfully but failed
the checksum/hash verification. This signals `silent`
With no suffix, `error` indicates a soft or logical error not
classified as a hardware I/O or silent data error.
_io - Indicates a physical Input/Output error, typically
signaling a failing sector, device, or cable issue.
_data - Indicates data that was read successfully but failed
the checksum/hash verification, signaling `silent`
corruption or an unsuccessful parity match.
<block> - The zero-based index of the block where the error occurred (uint).
<block> - The zero-based SnapRAID parity position associated with
the error (uint). It identifies the logical position affected
by the failed operation, not necessarily the physical sector
that caused the failure. Data file open/create errors occurring
while processing a position report the current block. The field
is empty when the error cannot be associated with a specific
position, such as for close errors.
<disk_name> - The name of the data disk.
<file> - The path (relative to the disk mount point) of the
file containing the block (escaped).
@ -1300,19 +1307,25 @@ commands that access files and parities.
`Data error at position <pos>, diff bits <diff>/<bits>`).
parity_error[_io|_data]:<block>:<level>:<msg>
Logs errors during parity disk read or write operations.
Logs errors affecting parity.
_io - Indicates a physical Input/Output error.
The disk was unable to read or write a specific block,
typically signaling a failing sector or cable issue.
_data - Indicates the data was read successfully but failed
the checksum/hash verification. This signals `silent`
corruption or an unsuccessful parity match.
<block> - The zero-based index of the block where the error occurred (uint).
With no suffix, `parity_error` indicates a soft or logical error
not classified as a hardware I/O or silent data error.
_io - Indicates a physical Input/Output error, typically
signaling a failing sector, device, or cable issue.
_data - Indicates data that was read successfully but failed
the parity verification, signaling `silent` corruption.
<block> - The zero-based SnapRAID parity position associated with
the error (uint). Parity open/create errors report block 0 as
a retry marker; this does not mean that parity block 0 is bad.
Parity access is attempted again by subsequent commands. The
field is empty when the error cannot be associated with a
specific position, such as for close errors.
<level> - The configuration name of the parity level (e.g.,
`parity`, `2-parity`).
<msg> - A descriptive message indicating the nature of the
error (e.g., `Read/Write error`,
error (e.g., `Open/Read/Write error`,
`Data error, diff bits <diff>/<bits>`).
hardlink_error[_io]:<disk_name>:<link_path>:<target_path>:<msg>