Fix typos in messages

This commit is contained in:
Andrea Mazzoleni 2023-12-09 12:07:28 +01:00
parent 607564c5fe
commit a605442c8c
11 changed files with 119 additions and 119 deletions

View file

@ -435,21 +435,21 @@ void file_copy(struct snapraid_file* src_file, struct snapraid_file* dst_file)
if (src_file->size != dst_file->size) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in copy file with different size\n");
log_fatal("Internal inconsistency: Copy file with different size\n");
os_abort();
/* LCOV_EXCL_STOP */
}
if (src_file->mtime_sec != dst_file->mtime_sec) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in copy file with different mtime_sec\n");
log_fatal("Internal inconsistency: Copy file with different mtime_sec\n");
os_abort();
/* LCOV_EXCL_STOP */
}
if (src_file->mtime_nsec != dst_file->mtime_nsec) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in copy file with different mtime_nsec\n");
log_fatal("Internal inconsistency: Copy file with different mtime_nsec\n");
os_abort();
/* LCOV_EXCL_STOP */
}
@ -499,7 +499,7 @@ int file_block_is_last(struct snapraid_file* file, block_off_t file_pos)
if (file_pos >= file->blockmax) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in file block position\n");
log_fatal("Internal inconsistency: File block position over the max\n");
os_abort();
/* LCOV_EXCL_STOP */
}
@ -620,13 +620,13 @@ struct snapraid_extent* extent_alloc(block_off_t parity_pos, struct snapraid_fil
if (count == 0) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency when allocating empty extent for file '%s' at position '%u/%u'\n", file->sub, file_pos, file->blockmax);
log_fatal("Internal inconsistency: Allocating empty extent for file '%s' at position '%u/%u'\n", file->sub, file_pos, file->blockmax);
os_abort();
/* LCOV_EXCL_STOP */
}
if (file_pos + count > file->blockmax) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency when allocating overflowing extent for file '%s' at position '%u:%u/%u'\n", file->sub, file_pos, count, file->blockmax);
log_fatal("Internal inconsistency: Allocating overflowing extent for file '%s' at position '%u:%u/%u'\n", file->sub, file_pos, count, file->blockmax);
os_abort();
/* LCOV_EXCL_STOP */
}
@ -938,7 +938,7 @@ static void extent_parity_check_foreach_unlock(void* void_arg, void* void_obj)
if (obj->count == 0) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in parity count zero for file '%s' at '%u'\n",
log_fatal("Internal inconsistency: Parity count zero for file '%s' at '%u'\n",
obj->file->sub, obj->parity_pos);
++arg->result;
return;
@ -952,7 +952,7 @@ static void extent_parity_check_foreach_unlock(void* void_arg, void* void_obj)
/* check the order */
if (prev->parity_pos >= obj->parity_pos) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in parity order for files '%s' at '%u:%u' and '%s' at '%u:%u'\n",
log_fatal("Internal inconsistency: Parity order for files '%s' at '%u:%u' and '%s' at '%u:%u'\n",
prev->file->sub, prev->parity_pos, prev->count, obj->file->sub, obj->parity_pos, obj->count);
++arg->result;
return;
@ -962,7 +962,7 @@ static void extent_parity_check_foreach_unlock(void* void_arg, void* void_obj)
/* check that the extents don't overlap */
if (prev->parity_pos + prev->count > obj->parity_pos) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency for parity overlap for files '%s' at '%u:%u' and '%s' at '%u:%u'\n",
log_fatal("Internal inconsistency: Parity overlap for files '%s' at '%u:%u' and '%s' at '%u:%u'\n",
prev->file->sub, prev->parity_pos, prev->count, obj->file->sub, obj->parity_pos, obj->count);
++arg->result;
return;
@ -988,7 +988,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
if (obj->count == 0) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in file count zero for file '%s' at '%u'\n",
log_fatal("Internal inconsistency: File count zero for file '%s' at '%u'\n",
obj->file->sub, obj->file_pos);
++arg->result;
return;
@ -1004,7 +1004,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
/* check that the extent doesn't overflow the file */
if (prev->file_pos + prev->count > prev->file->blockmax) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in delete end for file '%s' at '%u:%u' overflowing size '%u'\n",
log_fatal("Internal inconsistency: Delete end for file '%s' at '%u:%u' overflowing size '%u'\n",
prev->file->sub, prev->file_pos, prev->count, prev->file->blockmax);
++arg->result;
return;
@ -1014,7 +1014,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
/* check that the extent ends the file */
if (prev->file_pos + prev->count != prev->file->blockmax) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in file end for file '%s' at '%u:%u' instead of size '%u'\n",
log_fatal("Internal inconsistency: File end for file '%s' at '%u:%u' instead of size '%u'\n",
prev->file->sub, prev->file_pos, prev->count, prev->file->blockmax);
++arg->result;
return;
@ -1027,7 +1027,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
/* check that the extent doesn't overflow the file */
if (obj->file_pos + obj->count > obj->file->blockmax) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in delete start for file '%s' at '%u:%u' overflowing size '%u'\n",
log_fatal("Internal inconsistency: Delete start for file '%s' at '%u:%u' overflowing size '%u'\n",
obj->file->sub, obj->file_pos, obj->count, obj->file->blockmax);
++arg->result;
return;
@ -1037,7 +1037,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
/* check that the extent starts the file */
if (obj->file_pos != 0) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in file start for file '%s' at '%u:%u'\n",
log_fatal("Internal inconsistency: File start for file '%s' at '%u:%u'\n",
obj->file->sub, obj->file_pos, obj->count);
++arg->result;
return;
@ -1048,7 +1048,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
/* check the order */
if (prev->file_pos >= obj->file_pos) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in file order for file '%s' at '%u:%u' and at '%u:%u'\n",
log_fatal("Internal inconsistency: File order for file '%s' at '%u:%u' and at '%u:%u'\n",
prev->file->sub, prev->file_pos, prev->count, obj->file_pos, obj->count);
++arg->result;
return;
@ -1059,7 +1059,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
/* check that the extents don't overlap */
if (prev->file_pos + prev->count > obj->file_pos) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in delete sequence for file '%s' at '%u:%u' and at '%u:%u'\n",
log_fatal("Internal inconsistency: Delete sequence for file '%s' at '%u:%u' and at '%u:%u'\n",
prev->file->sub, prev->file_pos, prev->count, obj->file_pos, obj->count);
++arg->result;
return;
@ -1069,7 +1069,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
/* check that the extents are sequential */
if (prev->file_pos + prev->count != obj->file_pos) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency in file sequence for file '%s' at '%u:%u' and at '%u:%u'\n",
log_fatal("Internal inconsistency: File sequence for file '%s' at '%u:%u' and at '%u:%u'\n",
prev->file->sub, prev->file_pos, prev->count, obj->file_pos, obj->count);
++arg->result;
return;
@ -1267,7 +1267,7 @@ void fs_allocate(struct snapraid_disk* disk, block_off_t parity_pos, struct snap
/* ensure that we are extending the extent at the end */
if (file_pos != extent->file_pos + extent->count) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency when allocating file '%s' at position '%u/%u' in the middle of extent '%u:%u' in disk '%s'\n", file->sub, file_pos, file->blockmax, extent->file_pos, extent->count, disk->name);
log_fatal("Internal inconsistency: Allocating file '%s' at position '%u/%u' in the middle of extent '%u:%u' in disk '%s'\n", file->sub, file_pos, file->blockmax, extent->file_pos, extent->count, disk->name);
os_abort();
/* LCOV_EXCL_STOP */
}
@ -1289,7 +1289,7 @@ void fs_allocate(struct snapraid_disk* disk, block_off_t parity_pos, struct snap
if (parity_extent != extent || file_extent != extent) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency when allocating file '%s' at position '%u/%u' for existing extent '%u:%u' in disk '%s'\n", file->sub, file_pos, file->blockmax, extent->file_pos, extent->count, disk->name);
log_fatal("Internal inconsistency: Allocating file '%s' at position '%u/%u' for existing extent '%u:%u' in disk '%s'\n", file->sub, file_pos, file->blockmax, extent->file_pos, extent->count, disk->name);
os_abort();
/* LCOV_EXCL_STOP */
}
@ -1313,7 +1313,7 @@ void fs_deallocate(struct snapraid_disk* disk, block_off_t parity_pos)
extent = fs_par2extent_get_unlock(disk, &disk->fs_last, parity_pos);
if (!extent) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency when deallocating parity position '%u' for not existing extent in disk '%s'\n", parity_pos, disk->name);
log_fatal("Internal inconsistency: Deallocating parity position '%u' for not existing extent in disk '%s'\n", parity_pos, disk->name);
os_abort();
/* LCOV_EXCL_STOP */
}
@ -1368,7 +1368,7 @@ void fs_deallocate(struct snapraid_disk* disk, block_off_t parity_pos)
if (parity_extent != second_extent || file_extent != second_extent) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency when deallocating parity position '%u' for splitting extent '%u:%u' in disk '%s'\n", parity_pos, second_extent->file_pos, second_extent->count, disk->name);
log_fatal("Internal inconsistency: Deallocating parity position '%u' for splitting extent '%u:%u' in disk '%s'\n", parity_pos, second_extent->file_pos, second_extent->count, disk->name);
os_abort();
/* LCOV_EXCL_STOP */
}
@ -1383,7 +1383,7 @@ struct snapraid_block* fs_file2block_get(struct snapraid_file* file, block_off_t
{
if (file_pos >= file->blockmax) {
/* LCOV_EXCL_START */
log_fatal("Internal inconsistency when dereferencing file '%s' at position '%u/%u'\n", file->sub, file_pos, file->blockmax);
log_fatal("Internal inconsistency: Dereferencing file '%s' at position '%u/%u'\n", file->sub, file_pos, file->blockmax);
os_abort();
/* LCOV_EXCL_STOP */
}