Use "warning" for less relevant errors in the final exit status

This commit is contained in:
Andrea Mazzoleni 2026-01-20 23:52:13 +01:00
parent 4aa644c8d9
commit 94e71365b8
6 changed files with 14 additions and 10 deletions

4
TODO
View file

@ -7,6 +7,10 @@ This is the list of TODO items for SnapRAID.
* Integration with MergeFS ? * Integration with MergeFS ?
* Check Reliability Test
https://github.com/linuxhw/SMART
https://github.com/linuxhw/EnterpriseDrive
* Support BTRFS subvolumes. Keep track of the subvolumeid, along with the inode, and use it when searching/comparing inodes. * Support BTRFS subvolumes. Keep track of the subvolumeid, along with the inode, and use it when searching/comparing inodes.
The value 0 can be used for the root volume, like a normal filesystem. The value 0 can be used for the root volume, like a normal filesystem.
See: https://github.com/kdave/btrfs-progs/tree/master/libbtrfsutil See: https://github.com/kdave/btrfs-progs/tree/master/libbtrfsutil

View file

@ -704,7 +704,7 @@ end:
if (error + silent_error + io_error == 0) if (error + silent_error + io_error == 0)
log_tag("summary:exit:ok\n"); log_tag("summary:exit:ok\n");
else if (silent_error + io_error == 0) else if (silent_error + io_error == 0)
log_tag("summary:exit:alert\n"); log_tag("summary:exit:warning\n");
else else
log_tag("summary:exit:error\n"); log_tag("summary:exit:error\n");
log_flush(); log_flush();

View file

@ -1425,7 +1425,7 @@ end:
if (error + silent_error + io_error == 0) if (error + silent_error + io_error == 0)
log_tag("summary:exit:ok\n"); log_tag("summary:exit:ok\n");
else if (silent_error + io_error == 0) else if (silent_error + io_error == 0)
log_tag("summary:exit:alert\n"); log_tag("summary:exit:warning\n");
else else
log_tag("summary:exit:error\n"); log_tag("summary:exit:error\n");
log_flush(); log_flush();

View file

@ -1012,9 +1012,9 @@ one of the following:
.I ok .I ok
No issues. The array is fully synchronized and healthy. No issues. The array is fully synchronized and healthy.
.HP 4 .HP 4
.I alert .I warning
Incomplete. Some files were skipped due to modifications Some files were skipped due to modifications during
during execution or permission issues. No hardware risk. execution or permission issues. No hardware risk.
.HP 4 .HP 4
.I error .I error
Critical failure. Indicates serious issues like I/O failures Critical failure. Indicates serious issues like I/O failures

View file

@ -668,8 +668,8 @@ Command Sync/Scrub Tags
one of the following: one of the following:
ok - No issues. The array is fully synchronized and healthy. ok - No issues. The array is fully synchronized and healthy.
alert - Incomplete. Some files were skipped due to modifications warning - Some files were skipped due to modifications during
during execution or permission issues. No hardware risk. execution or permission issues. No hardware risk.
error - Critical failure. Indicates serious issues like I/O failures error - Critical failure. Indicates serious issues like I/O failures
or silent data corruption. Requires immediate hardware or silent data corruption. Requires immediate hardware
or filesystem inspection. or filesystem inspection.

View file

@ -696,8 +696,8 @@ These tags provide summary statistics at the end of the command.
one of the following: one of the following:
ok - No issues. The array is fully synchronized and healthy. ok - No issues. The array is fully synchronized and healthy.
alert - Incomplete. Some files were skipped due to modifications warning - Some files were skipped due to modifications during
during execution or permission issues. No hardware risk. execution or permission issues. No hardware risk.
error - Critical failure. Indicates serious issues like I/O failures error - Critical failure. Indicates serious issues like I/O failures
or silent data corruption. Requires immediate hardware or silent data corruption. Requires immediate hardware
or filesystem inspection. or filesystem inspection.