mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Revise log documentation
This commit is contained in:
parent
8cc9a2cf20
commit
69d9335c9c
6 changed files with 43 additions and 46 deletions
|
|
@ -1223,7 +1223,7 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna
|
|||
failed[failed_count].handle = &handle[j];
|
||||
++failed_count;
|
||||
|
||||
log_tag("error:%u:%s:%s: Data error at position %u, diff bits %u/%u\n", i, disk->name, esc_tag(file->sub, esc_buffer), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_tag("error:%u:%s:%s: Data error at position %u, diff hash bits %u/%u\n", i, disk->name, esc_tag(file->sub, esc_buffer), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
++error;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -1329,7 +1329,7 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna
|
|||
/* mark that the read parity is wrong, setting ptr to 0 */
|
||||
buffer_recov[l] = 0;
|
||||
|
||||
log_tag("parity_error:%u:%s: Data error, diff bits %u/%u\n", i, lev_config_name(l), diff, state->block_size * 8);
|
||||
log_tag("parity_error:%u:%s: Data error, diff parity bits %u/%u\n", i, lev_config_name(l), diff, state->block_size * 8);
|
||||
++error;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -486,12 +486,12 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
|
||||
/* it's a silent error only if we are dealing with synced files */
|
||||
if (file_is_unsynced) {
|
||||
log_tag("error:%u:%s:%s: Data error at position %u, diff bits %u/%u\n", blockcur, disk->name, esc_tag(file->sub, esc_buffer), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_tag("error:%u:%s:%s: Data error at position %u, diff hash bits %u/%u\n", blockcur, disk->name, esc_tag(file->sub, esc_buffer), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
++error;
|
||||
error_on_this_block = 1;
|
||||
} else {
|
||||
log_tag("error_data:%u:%s:%s: Data error at position %u, diff bits %u/%u\n", blockcur, disk->name, esc_tag(file->sub, esc_buffer), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_error("Data error in file '%s' at position '%u', diff bits %u/%u\n", task->path, file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_tag("error_data:%u:%s:%s: Data error at position %u, diff hash bits %u/%u\n", blockcur, disk->name, esc_tag(file->sub, esc_buffer), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_error("Data error in file '%s' at position '%u', diff hash bits %u/%u\n", task->path, file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
++silent_error;
|
||||
silent_error_on_this_block = 1;
|
||||
}
|
||||
|
|
@ -579,12 +579,12 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
|||
|
||||
/* it's a silent error only if we are dealing with synced blocks */
|
||||
if (block_is_unsynced) {
|
||||
log_tag("parity_error:%u:%s: Data error, diff bits %u/%u\n", blockcur, lev_config_name(l), diff, state->block_size * 8);
|
||||
log_tag("parity_error:%u:%s: Data error, diff parity bits %u/%u\n", blockcur, lev_config_name(l), diff, state->block_size * 8);
|
||||
++error;
|
||||
error_on_this_block = 1;
|
||||
} else {
|
||||
log_tag("parity_error_data:%u:%s: Data error, diff bits %u/%u\n", blockcur, lev_config_name(l), diff, state->block_size * 8);
|
||||
log_error("Data error in parity '%s' at position '%u', diff bits %u/%u\n", lev_config_name(l), blockcur, diff, state->block_size * 8);
|
||||
log_tag("parity_error_data:%u:%s: Data error, diff parity bits %u/%u\n", blockcur, lev_config_name(l), diff, state->block_size * 8);
|
||||
log_error("Data error in parity '%s' at position '%u', diff parity bits %u/%u\n", lev_config_name(l), blockcur, diff, state->block_size * 8);
|
||||
++silent_error;
|
||||
silent_error_on_this_block = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -987,8 +987,8 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
continue;
|
||||
} else { /* otherwise it's a BLK with silent error */
|
||||
unsigned diff = memdiff(hash, block->hash, BLOCK_HASH_SIZE);
|
||||
log_tag("error_data:%u:%s:%s: Data error at position %u, diff bits %u/%u\n", blockcur, disk->name, esc_tag(file->sub, esc_buffer), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_error("Data error in file '%s' at position '%u', diff bits %u/%u\n", task->path, file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_tag("error_data:%u:%s:%s: Data error at position %u, diff hash bits %u/%u\n", blockcur, disk->name, esc_tag(file->sub, esc_buffer), file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
log_error("Data error in file '%s' at position '%u', diff hash bits %u/%u\n", task->path, file_pos, diff, BLOCK_HASH_SIZE * 8);
|
||||
|
||||
/* save the failed block for the fix */
|
||||
failed[failed_count].index = diskcur;
|
||||
|
|
|
|||
|
|
@ -281,19 +281,18 @@ Only with \`\-\-gui\-verbose\`.
|
|||
Name of the data disk.
|
||||
.HP 4
|
||||
.I <path>
|
||||
Path to the file/link/dir relative to the disk mount
|
||||
Path to the file/link relative to the disk mount
|
||||
(escaped).
|
||||
.PD
|
||||
.RE
|
||||
.TP
|
||||
.B scan:add:<disk_name>:<path>
|
||||
A new file, link, or directory was found that is not in the
|
||||
content file. This item will be added to the array in a \`sync\`.
|
||||
A new file or link was found that is not in the content file.
|
||||
This item will be added to the array in a \`sync\`.
|
||||
.TP
|
||||
.B scan:remove:<disk_name>:<path>
|
||||
A file, link, or directory has been removed from the filesystem
|
||||
since the last sync. This item will be removed from the
|
||||
content file in a \`sync\`.
|
||||
A file or link has been removed from the filesystem
|
||||
since the last sync.
|
||||
.TP
|
||||
.B scan:update:<disk_name>:<path>
|
||||
A file or link has been updated (size, timestamp, or link target changed).
|
||||
|
|
@ -337,15 +336,15 @@ is assumed to be correct.
|
|||
These tags provide a final count of all detected changes.
|
||||
.TP
|
||||
.B summary:equal:<count>
|
||||
Total number of files/dirs/links whose metadata and data match
|
||||
Total number of files and links whose metadata and data match
|
||||
the current parity (uint).
|
||||
.TP
|
||||
.B summary:added:<count>
|
||||
Total number of new brand new files/dirs/links that have no
|
||||
relationship to existing parity (uint).
|
||||
Total number of brand new files and links not present in the
|
||||
last sync (uint).
|
||||
.TP
|
||||
.B summary:removed:<count>
|
||||
Total number of files/dirs/links that existed in the last sync
|
||||
Total number of files and links that existed in the last sync
|
||||
but are now missing (uint).
|
||||
.TP
|
||||
.B summary:updated:<count>
|
||||
|
|
@ -353,8 +352,8 @@ Total number of existing files where the timestamp or size has
|
|||
changed (uint).
|
||||
.TP
|
||||
.B summary:moved:<count>
|
||||
Total number of files relocated to a new path but retaining
|
||||
the same inode (uint).
|
||||
Total number of files relocated to a new path or renamed but
|
||||
retaining the same inode (uint).
|
||||
.TP
|
||||
.B summary:copied:<count>
|
||||
Total number of new files created by copying an existing
|
||||
|
|
|
|||
|
|
@ -207,17 +207,16 @@ Scan Tags
|
|||
Only with `--gui-verbose`.
|
||||
|
||||
<disk_name> - Name of the data disk.
|
||||
<path> - Path to the file/link/dir relative to the disk mount
|
||||
<path> - Path to the file/link relative to the disk mount
|
||||
(escaped).
|
||||
|
||||
=scan:add:<disk_name>:<path>
|
||||
A new file, link, or directory was found that is not in the
|
||||
content file. This item will be added to the array in a `sync`.
|
||||
A new file or link was found that is not in the content file.
|
||||
This item will be added to the array in a `sync`.
|
||||
|
||||
=scan:remove:<disk_name>:<path>
|
||||
A file, link, or directory has been removed from the filesystem
|
||||
since the last sync. This item will be removed from the
|
||||
content file in a `sync`.
|
||||
A file or link has been removed from the filesystem
|
||||
since the last sync.
|
||||
|
||||
=scan:update:<disk_name>:<path>
|
||||
A file or link has been updated (size, timestamp, or link target changed).
|
||||
|
|
@ -247,15 +246,15 @@ Scan Tags
|
|||
These tags provide a final count of all detected changes.
|
||||
|
||||
=summary:equal:<count>
|
||||
Total number of files/dirs/links whose metadata and data match
|
||||
Total number of files and links whose metadata and data match
|
||||
the current parity (uint).
|
||||
|
||||
=summary:added:<count>
|
||||
Total number of new brand new files/dirs/links that have no
|
||||
relationship to existing parity (uint).
|
||||
Total number of brand new files and links not present in the
|
||||
last sync (uint).
|
||||
|
||||
=summary:removed:<count>
|
||||
Total number of files/dirs/links that existed in the last sync
|
||||
Total number of files and links that existed in the last sync
|
||||
but are now missing (uint).
|
||||
|
||||
=summary:updated:<count>
|
||||
|
|
@ -263,8 +262,8 @@ Scan Tags
|
|||
changed (uint).
|
||||
|
||||
=summary:moved:<count>
|
||||
Total number of files relocated to a new path but retaining
|
||||
the same inode (uint).
|
||||
Total number of files relocated to a new path or renamed but
|
||||
retaining the same inode (uint).
|
||||
|
||||
=summary:copied:<count>
|
||||
Total number of new files created by copying an existing
|
||||
|
|
|
|||
|
|
@ -223,17 +223,16 @@ content file. They are output for every discovered change, and
|
|||
Only with `--gui-verbose`.
|
||||
|
||||
<disk_name> - Name of the data disk.
|
||||
<path> - Path to the file/link/dir relative to the disk mount
|
||||
<path> - Path to the file/link relative to the disk mount
|
||||
(escaped).
|
||||
|
||||
scan:add:<disk_name>:<path>
|
||||
A new file, link, or directory was found that is not in the
|
||||
content file. This item will be added to the array in a `sync`.
|
||||
A new file or link was found that is not in the content file.
|
||||
This item will be added to the array in a `sync`.
|
||||
|
||||
scan:remove:<disk_name>:<path>
|
||||
A file, link, or directory has been removed from the filesystem
|
||||
since the last sync. This item will be removed from the
|
||||
content file in a `sync`.
|
||||
A file or link has been removed from the filesystem
|
||||
since the last sync.
|
||||
|
||||
scan:update:<disk_name>:<path>
|
||||
A file or link has been updated (size, timestamp, or link target changed).
|
||||
|
|
@ -263,15 +262,15 @@ content file. They are output for every discovered change, and
|
|||
These tags provide a final count of all detected changes.
|
||||
|
||||
summary:equal:<count>
|
||||
Total number of files/dirs/links whose metadata and data match
|
||||
Total number of files and links whose metadata and data match
|
||||
the current parity (uint).
|
||||
|
||||
summary:added:<count>
|
||||
Total number of new brand new files/dirs/links that have no
|
||||
relationship to existing parity (uint).
|
||||
Total number of brand new files and links not present in the
|
||||
last sync (uint).
|
||||
|
||||
summary:removed:<count>
|
||||
Total number of files/dirs/links that existed in the last sync
|
||||
Total number of files and links that existed in the last sync
|
||||
but are now missing (uint).
|
||||
|
||||
summary:updated:<count>
|
||||
|
|
@ -279,8 +278,8 @@ These tags provide a final count of all detected changes.
|
|||
changed (uint).
|
||||
|
||||
summary:moved:<count>
|
||||
Total number of files relocated to a new path but retaining
|
||||
the same inode (uint).
|
||||
Total number of files relocated to a new path or renamed but
|
||||
retaining the same inode (uint).
|
||||
|
||||
summary:copied:<count>
|
||||
Total number of new files created by copying an existing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue