Fix typos

This commit is contained in:
Andrea Gelmini 2020-05-02 14:21:40 +02:00 • committed by Andrea Mazzoleni
parent f3b3182885
commit 986e9b4131
41 changed files with 89 additions and 89 deletions

View file

@ -152,7 +152,7 @@ SnapRAID HISTORY
A workaround was to just run 'sync' one time with the -N, A workaround was to just run 'sync' one time with the -N,
--force-nocopy option to disable the copy detection. --force-nocopy option to disable the copy detection.
* Restored the -O2 optimization option for Windows binaries, as -Og has * Restored the -O2 optimization option for Windows binaries, as -Og has
a too big performance penality. a too big performance penalty.
9.2 2016/01 9.2 2016/01
=========== ===========
@ -425,7 +425,7 @@ SnapRAID HISTORY
and Opteron. and Opteron.
* Faster RAID5 and RAID6 implementation for ARM 64 bit CPUs. * Faster RAID5 and RAID6 implementation for ARM 64 bit CPUs.
* If a silent error is found during a "sync" command, directly marks * If a silent error is found during a "sync" command, directly marks
the block as bad like in "scrub", without stopping the the "sync" the block as bad like in "scrub", without stopping the "sync"
process. process.
* Sort files by inode when listing the directory. This improves * Sort files by inode when listing the directory. This improves
the scanning performance. the scanning performance.

View file

@ -159,7 +159,7 @@ maintainer-clean-local:
CHECKFLAGS_COMMON = --test-skip-device --test-skip-self --test-force-progress --no-warnings --test-parity-limit=3333333 CHECKFLAGS_COMMON = --test-skip-device --test-skip-self --test-force-progress --no-warnings --test-parity-limit=3333333
# --test-force-order-alpha # --test-force-order-alpha
# Ensures to process files always in the same order despites # Ensures to process files always in the same order despite
# the inode, physical location, and dir order assigned by the OS. # the inode, physical location, and dir order assigned by the OS.
CHECKFLAGS_ALPHA = $(CHECKFLAGS_COMMON) --test-force-order-alpha CHECKFLAGS_ALPHA = $(CHECKFLAGS_COMMON) --test-force-order-alpha
@ -500,7 +500,7 @@ endif
$(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "rm bench/disk1/RUN-RM" --test-expect-failure sync $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "rm bench/disk1/RUN-RM" --test-expect-failure sync
echo RUN > bench/disk1/RUN-CHMOD echo RUN > bench/disk1/RUN-CHMOD
if HAVE_POSIX if HAVE_POSIX
# Doesn't run this test as root because the root user overrride permissions # Doesn't run this test as root because the root user override permissions
if [[ $$EUID -ne 0 ]]; then \ if [[ $$EUID -ne 0 ]]; then \
$(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "chmod a-r bench/disk1/RUN-CHMOD" --test-expect-failure sync; \ $(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "chmod a-r bench/disk1/RUN-CHMOD" --test-expect-failure sync; \
fi fi

12
TODO
View file

@ -25,8 +25,8 @@ with a mono thread implementation with 100.0000 files.
* Support more parity levels * Support more parity levels
It can be done with a generic computation function, using It can be done with a generic computation function, using
intrinsic for SSSE3 and AVX instructions. intrinsic for SSSE3 and AVX instructions.
It would be intersting to compare performance with the hand-written It would be interesting to compare performance with the hand-written
assembler functions. Eventially we can convert them to use intrinsic also. assembler functions. Eventually we can convert them to use intrinsic also.
https://sourceforge.net/p/snapraid/discussion/1677233/thread/9dbd7581/ https://sourceforge.net/p/snapraid/discussion/1677233/thread/9dbd7581/
* Extend haspdeep to support the SnapRAID hash : * Extend haspdeep to support the SnapRAID hash :
@ -151,7 +151,7 @@ See: https://sourceforge.net/p/snapraid/discussion/1677233/thread/cdea773f/
* Allocate parity minimizing concurrent use of it * Allocate parity minimizing concurrent use of it
Each parity allocation should check for a parity Each parity allocation should check for a parity
range with less utilization by other disks. range with less utilization by other disks.
We need to take care do disable this meachnism when the parity space We need to take care do disable this mechanism when the parity space
is near to fillup the parity partition. is near to fillup the parity partition.
See: https://sourceforge.net/p/snapraid/discussion/1677233/thread/1797bf7d/ See: https://sourceforge.net/p/snapraid/discussion/1677233/thread/1797bf7d/
+ This increase the possibility of recovering with multiple failures with not + This increase the possibility of recovering with multiple failures with not
@ -182,7 +182,7 @@ allowing the user to choose where to put it.
- It won't work with disks of different size. - It won't work with disks of different size.
Suppose to have all disks of size N, with only one of size M>N. Suppose to have all disks of size N, with only one of size M>N.
To fully use the M space, you can allocate a full N parity in such disk, To fully use the M space, you can allocate a full N parity in such disk,
but the remaning space will also need additional parity in the other disks, but the remaining space will also need additional parity in the other disks,
in fact requiring a total of M parity for the array. in fact requiring a total of M parity for the array.
In the end, we cannot avoid that the first biggest disk added is fully In the end, we cannot avoid that the first biggest disk added is fully
dedicated to parity, even if it means to leave some space unused. dedicated to parity, even if it means to leave some space unused.
@ -199,7 +199,7 @@ But it should be only few bits for each file. So, it should be manageable.
A lot of discussions about this feature :) A lot of discussions about this feature :)
https://sourceforge.net/p/snapraid/discussion/1677233/thread/b2cd9385/ https://sourceforge.net/p/snapraid/discussion/1677233/thread/b2cd9385/
- The only benefit is to distribute better the data. This could help the recovery process, - The only benefit is to distribute better the data. This could help the recovery process,
in case of multiple failures. But no real usability or funtionality benefit in the normal in case of multiple failures. But no real usability or functionality benefit in the normal
case. case.
* https://sourceforge.net/p/snapraid/discussion/1677233/thread/2cb97e8a/ * https://sourceforge.net/p/snapraid/discussion/1677233/thread/2cb97e8a/
@ -229,7 +229,7 @@ are automatically deleted.
* Checks if splitting hash/parity computation in 4K pages * Checks if splitting hash/parity computation in 4K pages
can improve speed in sync. That should increase cache locality, can improve speed in sync. That should increase cache locality,
because we read the data two times for hash and and parity, because we read the data two times for hash and parity,
and if we manage to keep it in the cache, we should save time. and if we manage to keep it in the cache, we should save time.
- We now hash first the faster disks, and this could - We now hash first the faster disks, and this could
reduce performance as we'll have to wait for all disks. reduce performance as we'll have to wait for all disks.

View file

@ -1,7 +1,7 @@
dnl @synopsis AC_CHECK_CC_OPT(flag, ifyes, ifno) dnl @synopsis AC_CHECK_CC_OPT(flag, ifyes, ifno)
dnl dnl
dnl Shows a message as like "checking wether gcc accepts flag ... no" dnl Shows a message as like "checking whether gcc accepts flag ... no"
dnl and executess ifyes or ifno. dnl and executes ifyes or ifno.
AC_DEFUN([AC_CHECK_CC_OPT], AC_DEFUN([AC_CHECK_CC_OPT],
[ [

View file

@ -574,7 +574,7 @@ static int repair(struct snapraid_state* state, int rehash, unsigned pos, unsign
} else { } else {
log_tag("recover_unsync:%u:%u: Skipped for%s%s\n", pos, n, log_tag("recover_unsync:%u:%u: Skipped for%s%s\n", pos, n,
!something_to_recover ? " nothing to recover" : "", !something_to_recover ? " nothing to recover" : "",
!something_unsynced ? " nothing unsynched" : "" !something_unsynced ? " nothing unsynced" : ""
); );
} }

View file

@ -818,7 +818,7 @@ static void state_smart(unsigned n, tommy_list* low)
/* |<##################################################################72>|####80>| */ /* |<##################################################################72>|####80>| */
printf("These values are the probabilities that in the next year you'll have a\n"); printf("These values are the probabilities that in the next year you'll have a\n");
printf("sequence of failures that the parity WONT be able to recover, assuming\n"); printf("sequence of failures that the parity WON'T be able to recover, assuming\n");
printf("that you regularly scrub, and in case repair, the array in the specified\n"); printf("that you regularly scrub, and in case repair, the array in the specified\n");
printf("time.\n"); printf("time.\n");

View file

@ -349,7 +349,7 @@ struct snapraid_disk {
block_off_t first_free_block; block_off_t first_free_block;
int has_volatile_inodes; /**< If the underline file-system has not persistent inodes. */ int has_volatile_inodes; /**< If the underline file-system has not persistent inodes. */
int has_volatile_hardlinks; /**< If the underline file-system has not syncronized metadata for hardlink (NTFS). */ int has_volatile_hardlinks; /**< If the underline file-system has not synchronized metadata for hardlink (NTFS). */
int has_unreliable_physical; /**< If the physical offset of files has duplicates. */ int has_unreliable_physical; /**< If the physical offset of files has duplicates. */
int has_different_uuid; /**< If the disk has a different UUID, meaning that it is not the same file-system. */ int has_different_uuid; /**< If the disk has a different UUID, meaning that it is not the same file-system. */
int has_unsupported_uuid; /**< If the disk doesn't report UUID, meaning it's not supported. */ int has_unsupported_uuid; /**< If the disk doesn't report UUID, meaning it's not supported. */
@ -1000,7 +1000,7 @@ int fs_check(struct snapraid_disk* disk);
* After this call you can use the par2file/par2block operations * After this call you can use the par2file/par2block operations
* to query the relation. * to query the relation.
* *
* \note This function is NOT thread-safe as it uses the the disk cache. + * \note This function is NOT thread-safe as it uses the disk cache. +
*/ */
void fs_allocate(struct snapraid_disk* disk, block_off_t parity_pos, struct snapraid_file* file, block_off_t file_pos); void fs_allocate(struct snapraid_disk* disk, block_off_t parity_pos, struct snapraid_file* file, block_off_t file_pos);
@ -1010,7 +1010,7 @@ void fs_allocate(struct snapraid_disk* disk, block_off_t parity_pos, struct snap
* After this call the par2file/par2block operations * After this call the par2file/par2block operations
* won't find anymore the parity association. * won't find anymore the parity association.
* *
* \note This function is NOT thread-safe as it uses the the disk cache. * \note This function is NOT thread-safe as it uses the disk cache.
*/ */
void fs_deallocate(struct snapraid_disk* disk, block_off_t pos); void fs_deallocate(struct snapraid_disk* disk, block_off_t pos);
@ -1129,7 +1129,7 @@ static inline snapraid_info info_make(time_t last_access, int error, int rehash,
/** /**
* Extract the time information. * Extract the time information.
* This is the last time when the block was know to be correct. * This is the last time when the block was know to be correct.
* The "scrubbed" info tells if the time is referreing at the latest sync or scrub. * The "scrubbed" info tells if the time is referring at the latest sync or scrub.
*/ */
static inline time_t info_get_time(snapraid_info info) static inline time_t info_get_time(snapraid_info info)
{ {

View file

@ -306,7 +306,7 @@ void io_init(struct snapraid_io* io, struct snapraid_state* state,
struct snapraid_parity_handle* parity_handle_map, unsigned parity_handle_max); struct snapraid_parity_handle* parity_handle_map, unsigned parity_handle_max);
/** /**
* Deinitialize te InputOutput workers. * Deinitialize the InputOutput workers.
*/ */
void io_done(struct snapraid_io* io); void io_done(struct snapraid_io* io);

View file

@ -1556,7 +1556,7 @@ int windows_link(const char* existing, const char* file)
} }
/** /**
* In Windows 10 allow creationg of symblink by not priviliged user. * In Windows 10 allow creation of symblink by not privileged user.
* *
* See: Symlinks in Windows 10! * See: Symlinks in Windows 10!
* https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/#cQG7cx48oGH86lkI.97 * https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/#cQG7cx48oGH86lkI.97
@ -1724,7 +1724,7 @@ int fsinfo(const char* path, int* has_persistent_inode, int* has_syncronized_har
if (has_persistent_inode) if (has_persistent_inode)
*has_persistent_inode = 1; *has_persistent_inode = 1;
/* NTFS doesn't syncronize hardlinks metadata */ /* NTFS doesn't synchronize hardlinks metadata */
if (has_syncronized_hardlinks) if (has_syncronized_hardlinks)
*has_syncronized_hardlinks = 0; *has_syncronized_hardlinks = 0;

View file

@ -761,7 +761,7 @@ int parity_sync(struct snapraid_parity_handle* handle)
ret = fsync(split->f); ret = fsync(split->f);
if (ret != 0) { if (ret != 0) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
log_fatal("Error synching parity file '%s'. %s.\n", split->path, strerror(errno)); log_fatal("Error syncing parity file '%s'. %s.\n", split->path, strerror(errno));
return -1; return -1;
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }

View file

@ -369,7 +369,7 @@ static void make_link(tommy_hashdyn* poolset, const char* pool_dir, const char*
#ifdef _WIN32 #ifdef _WIN32
} else if (errno == EPERM) { } else if (errno == EPERM) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
log_fatal("You must run as Adminstrator to be able to create symlinks.\n"); log_fatal("You must run as Administrator to be able to create symlinks.\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
#endif #endif

View file

@ -35,7 +35,7 @@
#define __USE_MINGW_ANSI_STDIO 1 #define __USE_MINGW_ANSI_STDIO 1
/** /**
* Define the MSVCRT version targetting Windows Vista. * Define the MSVCRT version targeting Windows Vista.
*/ */
#define __MSVCRT_VERSION__ 0x0600 #define __MSVCRT_VERSION__ 0x0600

View file

@ -501,7 +501,7 @@ static void scan_file_refresh(struct snapraid_scan* scan, const char* sub, struc
* because the metadata in the directory is updated only when the file * because the metadata in the directory is updated only when the file
* is closed. * is closed.
* *
* The same happens for hardlinks that duplicate metatada. * The same happens for hardlinks that duplicate metadata.
* The link metadata is updated only when the link is opened. * The link metadata is updated only when the link is opened.
* This extends also to st_size and st_nlink. * This extends also to st_size and st_nlink.
* *

View file

@ -632,7 +632,7 @@ void selftest(void)
} }
if (raid_test_par(RAID_MODE_CAUCHY, 1, 256) != 0) { if (raid_test_par(RAID_MODE_CAUCHY, 1, 256) != 0) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
log_fatal("Failed GEN Cauchy test sigle data disk\n"); log_fatal("Failed GEN Cauchy test single data disk\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }

View file

@ -279,7 +279,7 @@ static void state_config_check(struct snapraid_state* state, const char* path, t
struct snapraid_disk* other = j->data; struct snapraid_disk* other = j->data;
if (disk->device == other->device) { if (disk->device == other->device) {
if (state->opt.force_device) { if (state->opt.force_device) {
/* note tha we just ignore the issue */ /* note that we just ignore the issue */
/* and we DON'T mark the disk to be skipped */ /* and we DON'T mark the disk to be skipped */
/* because we want to use these disks */ /* because we want to use these disks */
if (!state->opt.no_warnings) if (!state->opt.no_warnings)
@ -311,7 +311,7 @@ static void state_config_check(struct snapraid_state* state, const char* path, t
for (s = 0; s < state->parity[l].split_mac; ++s) { for (s = 0; s < state->parity[l].split_mac; ++s) {
if (disk->device == state->parity[l].split_map[s].device) { if (disk->device == state->parity[l].split_map[s].device) {
if (state->opt.force_device) { if (state->opt.force_device) {
/* note tha we just ignore the issue */ /* note that we just ignore the issue */
/* and we DON'T mark the disk to be skipped */ /* and we DON'T mark the disk to be skipped */
/* because we want to use these disks */ /* because we want to use these disks */
if (!state->opt.no_warnings) if (!state->opt.no_warnings)
@ -372,7 +372,7 @@ static void state_config_check(struct snapraid_state* state, const char* path, t
for (t = 0; t < state->parity[j].split_mac; ++t) { for (t = 0; t < state->parity[j].split_mac; ++t) {
if (state->parity[l].split_map[s].device == state->parity[j].split_map[t].device) { if (state->parity[l].split_map[s].device == state->parity[j].split_map[t].device) {
if (state->opt.force_device) { if (state->opt.force_device) {
/* note tha we just ignore the issue */ /* note that we just ignore the issue */
/* and we DON'T mark the disk to be skipped */ /* and we DON'T mark the disk to be skipped */
/* because we want to use these disks */ /* because we want to use these disks */
if (!state->opt.no_warnings) if (!state->opt.no_warnings)
@ -631,7 +631,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
} }
state->block_size *= KIBI; state->block_size *= KIBI;
} else if (strcmp(tag, "hashsize") == 0 } else if (strcmp(tag, "hashsize") == 0
|| strcmp(tag, "hash_size") == 0 /* v11.0 used incorretly this one, kept now for backward compatibility */ || strcmp(tag, "hash_size") == 0 /* v11.0 used incorrectly this one, kept now for backward compatibility */
) { ) {
uint32_t hash_size; uint32_t hash_size;
@ -1626,7 +1626,7 @@ static void state_content_check(struct snapraid_state* state, const char* path)
/** /**
* Check if the position is REQUIRED, or we can completely clear it from the state. * Check if the position is REQUIRED, or we can completely clear it from the state.
* *
* Note that position with only DELETED blocks are discarged. * Note that position with only DELETED blocks are discharged.
*/ */
static int fs_position_is_required(struct snapraid_state* state, block_off_t pos) static int fs_position_is_required(struct snapraid_state* state, block_off_t pos)
{ {
@ -1852,7 +1852,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
if (state->block_size == 0) { if (state->block_size == 0) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
decoding_error(path, f); decoding_error(path, f);
log_fatal("Internal incosistency due zero blocksize!\n"); log_fatal("Internal inconsistency due zero blocksize!\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
@ -4179,7 +4179,7 @@ void state_filter(struct snapraid_state* state, tommy_list* filterlist_file, tom
} }
} }
/* if we are filtering by disk, exclude any parity not explicitely included */ /* if we are filtering by disk, exclude any parity not explicitly included */
if (!tommy_list_empty(filterlist_disk)) { if (!tommy_list_empty(filterlist_disk)) {
/* for each parity disk */ /* for each parity disk */
for (l = 0; l < state->level; ++l) { for (l = 0; l < state->level; ++l) {

View file

@ -261,7 +261,7 @@ void state_rehash(struct snapraid_state* state);
*/ */
#define SCRUB_AUTO -1 /**< Automatic selection. */ #define SCRUB_AUTO -1 /**< Automatic selection. */
#define SCRUB_BAD -2 /**< Scrub only the bad blocks. */ #define SCRUB_BAD -2 /**< Scrub only the bad blocks. */
#define SCRUB_NEW -3 /**< Scub the new blocks. */ #define SCRUB_NEW -3 /**< Scrub the new blocks. */
#define SCRUB_FULL -4 /**< Scrub everything. */ #define SCRUB_FULL -4 /**< Scrub everything. */
#define SCRUB_EVEN -5 /**< Even blocks. */ #define SCRUB_EVEN -5 /**< Even blocks. */

View file

@ -112,7 +112,7 @@ int sopen_multi_file(STREAM* s, unsigned i, const char* file)
pathcpy(s->handle[i].path, sizeof(s->handle[i].path), file); pathcpy(s->handle[i].path, sizeof(s->handle[i].path), file);
/* O_EXCL to be resilent ensure to always create a new file and not use a stale link to the original file */ /* O_EXCL to be resilient ensure to always create a new file and not use a stale link to the original file */
f = open(file, O_WRONLY | O_CREAT | O_EXCL | O_BINARY | O_SEQUENTIAL, 0600); f = open(file, O_WRONLY | O_CREAT | O_EXCL | O_BINARY | O_SEQUENTIAL, 0600);
if (f == -1) { if (f == -1) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
@ -363,7 +363,7 @@ int sgettok(STREAM* f, char* str, int size)
break; break;
} }
if (c == '\n') { if (c == '\n') {
/* remove ending carrige return to support the Windows CR+LF format */ /* remove ending carriage return to support the Windows CR+LF format */
if (i != str && i[-1] == '\r') if (i != str && i[-1] == '\r')
--i; --i;
sungetc(c, f); sungetc(c, f);
@ -429,7 +429,7 @@ int sgetline(STREAM* f, char* str, int size)
while (1) { while (1) {
c = *pos++; c = *pos++;
if (c == '\n') { if (c == '\n') {
/* remove ending carrige return to support the Windows CR+LF format */ /* remove ending carriage return to support the Windows CR+LF format */
if (i != str && i[-1] == '\r') if (i != str && i[-1] == '\r')
--i; --i;
--pos; --pos;
@ -455,7 +455,7 @@ int sgetline(STREAM* f, char* str, int size)
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
if (c == '\n') { if (c == '\n') {
/* remove ending carrige return to support the Windows CR+LF format */ /* remove ending carriage return to support the Windows CR+LF format */
if (i != str && i[-1] == '\r') if (i != str && i[-1] == '\r')
--i; --i;
sungetc(c, f); sungetc(c, f);

View file

@ -812,7 +812,7 @@ int mkancestor(const char* file)
} }
#ifdef _WIN32 #ifdef _WIN32
/* if it's a drive specificaion like "C:" */ /* if it's a drive specification like "C:" */
if (isalpha(dir[0]) && dir[1] == ':' && dir[2] == 0) { if (isalpha(dir[0]) && dir[1] == ':' && dir[2] == 0) {
/* nothing more to do */ /* nothing more to do */
return 0; return 0;
@ -1237,7 +1237,7 @@ int advise_read(struct advise_struct* advise, int f, data_off_t offset, data_off
* non-blocking and do this work in a workqueue (or via some kind of * non-blocking and do this work in a workqueue (or via some kind of
* callback/continuation scheme). My worry is just doing this if a user * callback/continuation scheme). My worry is just doing this if a user
* application does something crazy, like request gigabytes and gigabytes * application does something crazy, like request gigabytes and gigabytes
* of readahead, and then repents of their craziness, there should be a * of readahead, and then repented of their craziness, there should be a
* way of cancelling the readahead request. Today, the user can just * way of cancelling the readahead request. Today, the user can just
* kill the application. But if we simply shove the work to a kernel * kill the application. But if we simply shove the work to a kernel
* thread, it becomes a lot harder to cancel the readahead request. We'd * thread, it becomes a lot harder to cancel the readahead request. We'd
@ -1633,16 +1633,16 @@ void thread_cond_wait(pthread_cond_t* cond, pthread_mutex_t* mutex)
/** /**
* Implementation note about conditional variables. * Implementation note about conditional variables.
* *
* The conditional variables can be signaled inside or ouside the mutex, * The conditional variables can be signaled inside or outside the mutex,
* what is better it's debatable but in general doing that ouside the mutex, * what is better it's debatable but in general doing that outside the mutex,
* reduces the number of context switches. * reduces the number of context switches.
* *
* But when when testing with helgrind and drd, this disallows such tools to * But when testing with helgrind and drd, this disallows such tools to
* to see the dependency between the signal and the wait. * to see the dependency between the signal and the wait.
* *
* To avoid it we signal everything inside the mutex. And we do this in both * To avoid it we signal everything inside the mutex. And we do this in both
* test mode (with CHERCKER defined) and release mode (CHECKER not defined), * test mode (with CHECKER defined) and release mode (CHECKER not defined),
* to be on the safe side and avoid any difference in beaviour between test and * to be on the safe side and avoid any difference in behaviour between test and
* release. * release.
* *
* Here some interesting discussion: * Here some interesting discussion:

View file

@ -1016,7 +1016,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
} }
/* if we have only silent errors we can try to fix them on-the-fly */ /* if we have only silent errors we can try to fix them on-the-fly */
/* note the the fix is not written to disk, but used only to */ /* note the fix is not written to disk, but used only to */
/* compute the new parity */ /* compute the new parity */
if (!error_on_this_block && !io_error_on_this_block && silent_error_on_this_block) { if (!error_on_this_block && !io_error_on_this_block && silent_error_on_this_block) {
unsigned failed_mac; unsigned failed_mac;
@ -1536,7 +1536,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
data_off_t out_size; data_off_t out_size;
parity_size(&parity_handle[l], &out_size); parity_size(&parity_handle[l], &out_size);
parity_overflow(state, out_size); parity_overflow(state, out_size);
log_fatal("WARNING! Without an usable %s file, it isn't possible to sync.\n", lev_name(l)); log_fatal("WARNING! Without a usable %s file, it isn't possible to sync.\n", lev_name(l));
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }

View file

@ -632,7 +632,7 @@ int filephy(const char* path, uint64_t size, uint64_t* physical)
/* In this way we keep them in the directory traversal order */ /* In this way we keep them in the directory traversal order */
/* that at least keeps files in the same directory together. */ /* that at least keeps files in the same directory together. */
/* Note also that in newer file-system with snapshot, like ZFS, */ /* Note also that in newer file-system with snapshot, like ZFS, */
/* the inode doesn't represent evenmore the disk position, because files */ /* the inode doesn't represent even more the disk position, because files */
/* are not overwritten in place, but rewritten in another location */ /* are not overwritten in place, but rewritten in another location */
/* of the disk. */ /* of the disk. */
*physical = FILEPHY_UNREPORTED_OFFSET; *physical = FILEPHY_UNREPORTED_OFFSET;

View file

@ -59,7 +59,7 @@ int dirent_hidden(struct dirent* dd);
const char* stat_desc(struct stat* st); const char* stat_desc(struct stat* st);
/** /**
* Return the aligment requirement for direct IO. * Return the alignment requirement for direct IO.
*/ */
size_t direct_size(void); size_t direct_size(void);

View file

@ -487,7 +487,7 @@ static inline uint64_t util_rotr64(uint64_t x, int8_t r)
/** /**
* Swap endianess. * Swap endianness.
* They are needed only if BigEndian. * They are needed only if BigEndian.
*/ */
#if defined(__GNUC__) #if defined(__GNUC__)

View file

@ -36,7 +36,7 @@
* @ip[] Vector of @nv indexes of the valid parity blocks. * @ip[] Vector of @nv indexes of the valid parity blocks.
* The indexes start from 0. They must be in order. * The indexes start from 0. They must be in order.
* @nd Number of data blocks. * @nd Number of data blocks.
* @size Size of the blocks pointed by @v. It must be a multipler of 64. * @size Size of the blocks pointed by @v. It must be a multiplier of 64.
* @v Vector of pointers to the blocks of data and parity. * @v Vector of pointers to the blocks of data and parity.
* It has (@nd + @ip[@nv - 1] + 1) elements. The starting elements are the * It has (@nd + @ip[@nv - 1] + 1) elements. The starting elements are the
* blocks for data, following with the parity blocks. * blocks for data, following with the parity blocks.

View file

@ -23,7 +23,7 @@
* *
* @n Number of integers currently in the vector. * @n Number of integers currently in the vector.
* @v Vector of integers already sorted. * @v Vector of integers already sorted.
* It must have extra space for the new elemet at the end. * It must have extra space for the new element at the end.
* @i Value to insert. * @i Value to insert.
*/ */
void raid_insert(int n, int *v, int i); void raid_insert(int n, int *v, int i);

View file

@ -174,7 +174,7 @@ void raid_recX_avx2(int nr, int *id, int *ip, int nd, size_t size, void **vv);
/* /*
* Internal naming. * Internal naming.
* *
* These are intented to provide access for testing. * These are intended to provide access for testing.
*/ */
const char *raid_gen1_tag(void); const char *raid_gen1_tag(void);
const char *raid_gen2_tag(void); const char *raid_gen2_tag(void);
@ -263,7 +263,7 @@ static __always_inline void raid_avx_end(void)
raid_sse_end(); raid_sse_end();
/* reset the upper part of the ymm registers */ /* reset the upper part of the ymm registers */
/* to avoid the 70 clocks penality on the next */ /* to avoid the 70 clocks penalty on the next */
/* xmm register use */ /* xmm register use */
asm volatile ("vzeroupper" : : : "memory"); asm volatile ("vzeroupper" : : : "memory");
} }

View file

@ -45,7 +45,7 @@
* gen2 6814 [MB/s] * gen2 6814 [MB/s]
* genz 3033 [MB/s] * genz 3033 [MB/s]
* *
* These are the results with displacement resulting in improvments * These are the results with displacement resulting in improvements
* in the order of 20% or more: * in the order of 20% or more:
* *
* sse2 * sse2

View file

@ -156,7 +156,7 @@ static void set_cauchy(uint8_t *matrix)
} }
/* /*
* Finally we adjust the matrix multipling each row for * Finally we adjust the matrix multiplying each row for
* the inverse of the first element in the row. * the inverse of the first element in the row.
* *
* Also this operation maintains the MDS property of the matrix. * Also this operation maintains the MDS property of the matrix.
@ -399,8 +399,8 @@ int main(void)
printf("/**\n"); printf("/**\n");
printf(" * PSHUFB tables for generic multiplication.\n"); printf(" * PSHUFB tables for generic multiplication.\n");
printf(" *\n"); printf(" *\n");
printf(" * Indexes are [MULTIPLER][LH].\n"); printf(" * Indexes are [MULTIPLIER][LH].\n");
printf(" * Where MULTIPLER is from 0 to 255, LH from 0 to 1.\n"); printf(" * Where MULTIPLIER is from 0 to 255, LH from 0 to 1.\n");
printf(" */\n"); printf(" */\n");
printf("const uint8_t __aligned(256) raid_gfmulpshufb[256][2][16] =\n"); printf("const uint8_t __aligned(256) raid_gfmulpshufb[256][2][16] =\n");
printf("{\n"); printf("{\n");

View file

@ -63,11 +63,11 @@
* computation of triple parity using power coefficients. * computation of triple parity using power coefficients.
* *
* Another important property of the Cauchy matrix is that we can setup * Another important property of the Cauchy matrix is that we can setup
* the first two rows with coeffients equal at the RAID5 and RAID6 approach * the first two rows with coefficients equal at the RAID5 and RAID6 approach
* decribed, resulting in a compatible extension, and requiring SSSE3 * described, resulting in a compatible extension, and requiring SSSE3
* or AVX2 instructions only if triple parity or beyond is used. * or AVX2 instructions only if triple parity or beyond is used.
* *
* The matrix is also adjusted, multipling each row by a constant factor * The matrix is also adjusted, multiplying each row by a constant factor
* to make the first column of all 1, to optimize the computation for * to make the first column of all 1, to optimize the computation for
* the first disk. * the first disk.
* *
@ -147,7 +147,7 @@
* "raid/test/speedtest.c" program. * "raid/test/speedtest.c" program.
* *
* For comparison, the triple parity computation using the power * For comparison, the triple parity computation using the power
* coeffients "1,2,2^-1" is only a little faster than the one based on * coefficients "1,2,2^-1" is only a little faster than the one based on
* the Cauchy matrix if SSSE3 or AVX2 is present. * the Cauchy matrix if SSSE3 or AVX2 is present.
* *
* int8 int32 int64 sse2 ssse3 avx2 * int8 int32 int64 sse2 ssse3 avx2
@ -205,12 +205,12 @@ void raid_zero(void *zero)
* All these functions give the guarantee that parities are written * All these functions give the guarantee that parities are written
* in order. First parity P, then parity Q, and so on. * in order. First parity P, then parity Q, and so on.
* This allows to specify the same memory buffer for multiple parities * This allows to specify the same memory buffer for multiple parities
* knowning that you'll get the latest written one. * knowing that you'll get the latest written one.
* This characteristic is used by the raid_delta_gen() function to * This characteristic is used by the raid_delta_gen() function to
* avoid to damage unused parities in recovering. * avoid to damage unused parities in recovering.
* *
* @nd Number of data blocks * @nd Number of data blocks
* @size Size of the blocks pointed by @v. It must be a multipler of 64. * @size Size of the blocks pointed by @v. It must be a multiplier of 64.
* @v Vector of pointers to the blocks of data and parity. * @v Vector of pointers to the blocks of data and parity.
* It has (@nd + #parities) elements. The starting elements are the blocks * It has (@nd + #parities) elements. The starting elements are the blocks
* for data, following with the parity blocks. * for data, following with the parity blocks.
@ -335,7 +335,7 @@ void raid_delta_gen(int nr, int *id, int *ip, int nd, size_t size, void **v)
} else { } else {
/* /*
* Unused parities are going to be rewritten with * Unused parities are going to be rewritten with
* not significative data, becase we don't have * not significative data, because we don't have
* functions able to compute only a subset of * functions able to compute only a subset of
* parities. * parities.
* *
@ -483,7 +483,7 @@ void raid_rec2of2_int8(int *id, int *ip, int nd, size_t size, void **vv)
* The indexes start from 0. They must be in order. * The indexes start from 0. They must be in order.
* @nd Number of data blocks. * @nd Number of data blocks.
* @np Number of parity blocks. * @np Number of parity blocks.
* @size Size of the blocks pointed by @v. It must be a multipler of 64. * @size Size of the blocks pointed by @v. It must be a multiplier of 64.
* @v Vector of pointers to the blocks of data and parity. * @v Vector of pointers to the blocks of data and parity.
* It has (@nd + @np) elements. The starting elements are the blocks * It has (@nd + @np) elements. The starting elements are the blocks
* for data, following with the parity blocks. * for data, following with the parity blocks.

View file

@ -13662,8 +13662,8 @@ const uint8_t __aligned(256) raid_gfcauchypshufb[251][4][2][16] =
/** /**
* PSHUFB tables for generic multiplication. * PSHUFB tables for generic multiplication.
* *
* Indexes are [MULTIPLER][LH]. * Indexes are [MULTIPLIER][LH].
* Where MULTIPLER is from 0 to 255, LH from 0 to 1. * Where MULTIPLIER is from 0 to 255, LH from 0 to 1.
*/ */
const uint8_t __aligned(256) raid_gfmulpshufb[256][2][16] = const uint8_t __aligned(256) raid_gfmulpshufb[256][2][16] =
{ {

View file

@ -3,7 +3,7 @@
# #
# selftest - Runs the same selftest and speedtest executed at the module startup. # selftest - Runs the same selftest and speedtest executed at the module startup.
# fulltest - Runs a more extensive test that checks all the built-in functions. # fulltest - Runs a more extensive test that checks all the built-in functions.
# speetest - Runs a more complete speed test. # speedtest - Runs a more complete speed test.
# invtest - Runs an extensive matrix inversion test of all the 377.342.351.231 # invtest - Runs an extensive matrix inversion test of all the 377.342.351.231
# possible square submatrices of the Cauchy matrix used. # possible square submatrices of the Cauchy matrix used.
# covtest - Runs a coverage test. # covtest - Runs a coverage test.

View file

@ -687,7 +687,7 @@ run \[dq]sync\[dq]. Later modifications are not taken into account.
If bad blocks were detected, their block numbers are listed. If bad blocks were detected, their block numbers are listed.
To fix them, you can use the \[dq]fix \-e\[dq] command. To fix them, you can use the \[dq]fix \-e\[dq] command.
.PP .PP
It also shows a graph representing the the last time each block It also shows a graph representing the last time each block
was scrubbed or synced. Scrubbed blocks are shown with \'*\', was scrubbed or synced. Scrubbed blocks are shown with \'*\',
blocks synced but not yet scrubbed with \'o\'. blocks synced but not yet scrubbed with \'o\'.
.PP .PP
@ -890,7 +890,7 @@ Use the filter options to select a subset of files or disks to operate on.
To only fix the blocks marked bad during \[dq]sync\[dq] and \[dq]scrub\[dq], To only fix the blocks marked bad during \[dq]sync\[dq] and \[dq]scrub\[dq],
use the \-e, \-\-filter\-error option. use the \-e, \-\-filter\-error option.
As difference from other filter options, with this one the fixes are As difference from other filter options, with this one the fixes are
applied only to files that are not modified from the the latest \[dq]sync\[dq]. applied only to files that are not modified from the latest \[dq]sync\[dq].
.PP .PP
All the files that cannot be fixed are renamed adding the All the files that cannot be fixed are renamed adding the
\[dq].unrecoverable\[dq] extension. \[dq].unrecoverable\[dq] extension.

View file

@ -401,7 +401,7 @@ Commands
If bad blocks were detected, their block numbers are listed. If bad blocks were detected, their block numbers are listed.
To fix them, you can use the "fix -e" command. To fix them, you can use the "fix -e" command.
It also shows a graph representing the the last time each block It also shows a graph representing the last time each block
was scrubbed or synced. Scrubbed blocks are shown with '*', was scrubbed or synced. Scrubbed blocks are shown with '*',
blocks synced but not yet scrubbed with 'o'. blocks synced but not yet scrubbed with 'o'.
@ -578,7 +578,7 @@ Commands
To only fix the blocks marked bad during "sync" and "scrub", To only fix the blocks marked bad during "sync" and "scrub",
use the -e, --filter-error option. use the -e, --filter-error option.
As difference from other filter options, with this one the fixes are As difference from other filter options, with this one the fixes are
applied only to files that are not modified from the the latest "sync". applied only to files that are not modified from the latest "sync".
All the files that cannot be fixed are renamed adding the All the files that cannot be fixed are renamed adding the
".unrecoverable" extension. ".unrecoverable" extension.

View file

@ -427,7 +427,7 @@ run "sync". Later modifications are not taken into account.
If bad blocks were detected, their block numbers are listed. If bad blocks were detected, their block numbers are listed.
To fix them, you can use the "fix -e" command. To fix them, you can use the "fix -e" command.
It also shows a graph representing the the last time each block It also shows a graph representing the last time each block
was scrubbed or synced. Scrubbed blocks are shown with '*', was scrubbed or synced. Scrubbed blocks are shown with '*',
blocks synced but not yet scrubbed with 'o'. blocks synced but not yet scrubbed with 'o'.
@ -618,7 +618,7 @@ Use the filter options to select a subset of files or disks to operate on.
To only fix the blocks marked bad during "sync" and "scrub", To only fix the blocks marked bad during "sync" and "scrub",
use the -e, --filter-error option. use the -e, --filter-error option.
As difference from other filter options, with this one the fixes are As difference from other filter options, with this one the fixes are
applied only to files that are not modified from the the latest "sync". applied only to files that are not modified from the latest "sync".
All the files that cannot be fixed are renamed adding the All the files that cannot be fixed are renamed adding the
".unrecoverable" extension. ".unrecoverable" extension.

View file

@ -114,7 +114,7 @@ tommy_inline void tommy_chain_merge(tommy_chain* first, tommy_chain* second, tom
/** /**
* Merges two chains managing special degenerated cases. * Merges two chains managing special degenerated cases.
* It's funtionally equivalent at tommy_chain_merge() but faster with already ordered chains. * It's functionally equivalent at tommy_chain_merge() but faster with already ordered chains.
*/ */
tommy_inline void tommy_chain_merge_degenerated(tommy_chain* first, tommy_chain* second, tommy_compare_func* cmp) tommy_inline void tommy_chain_merge_degenerated(tommy_chain* first, tommy_chain* second, tommy_compare_func* cmp)
{ {
@ -153,7 +153,7 @@ tommy_inline void tommy_chain_mergesort(tommy_chain* chain, tommy_compare_func*
/* /*
* Bit buckets of chains. * Bit buckets of chains.
* Each bucket contains 2^i nodes or it's empty. * Each bucket contains 2^i nodes or it's empty.
* The chain at address TOMMY_BIT_MAX is an independet variable operating as "carry". * The chain at address TOMMY_BIT_MAX is an independent variable operating as "carry".
* We keep it in the same "bit" vector to avoid reports from the valgrind tool sgcheck. * We keep it in the same "bit" vector to avoid reports from the valgrind tool sgcheck.
*/ */
tommy_chain bit[TOMMY_SIZE_BIT + 1]; tommy_chain bit[TOMMY_SIZE_BIT + 1];

View file

@ -231,7 +231,7 @@ tommy_uint32_t tommy_strhash_u32(tommy_uint64_t init_val, const void* void_key)
key += 12; key += 12;
} }
/* for lengths that are multiplers of 12 we already have called mix */ /* for lengths that are multipliers of 12 we already have called mix */
/* this is different than the original lookup3 and the result won't match */ /* this is different than the original lookup3 and the result won't match */
tommy_final(a, b, c); tommy_final(a, b, c);

View file

@ -52,7 +52,7 @@
* \param void_key Pointer to the data to hash. * \param void_key Pointer to the data to hash.
* \param key_len Size of the data to hash. * \param key_len Size of the data to hash.
* \note * \note
* This function is endianess independent. * This function is endianness independent.
* \return The hash value of 32 bits. * \return The hash value of 32 bits.
*/ */
tommy_uint32_t tommy_hash_u32(tommy_uint32_t init_val, const void* void_key, tommy_size_t key_len); tommy_uint32_t tommy_hash_u32(tommy_uint32_t init_val, const void* void_key, tommy_size_t key_len);
@ -72,14 +72,14 @@ tommy_uint32_t tommy_hash_u32(tommy_uint32_t init_val, const void* void_key, tom
* \param void_key Pointer to the data to hash. * \param void_key Pointer to the data to hash.
* \param key_len Size of the data to hash. * \param key_len Size of the data to hash.
* \note * \note
* This function is endianess independent. * This function is endianness independent.
* \return The hash value of 64 bits. * \return The hash value of 64 bits.
*/ */
tommy_uint64_t tommy_hash_u64(tommy_uint64_t init_val, const void* void_key, tommy_size_t key_len); tommy_uint64_t tommy_hash_u64(tommy_uint64_t init_val, const void* void_key, tommy_size_t key_len);
/** /**
* String hash function with a 32 bits result. * String hash function with a 32 bits result.
* Implementation is based on the the Robert Jenkins "lookup3" hash 32 bits version, * Implementation is based on Robert Jenkins "lookup3" hash 32 bits version,
* from http://www.burtleburtle.net/bob/hash/doobs.html, function hashlittle(). * from http://www.burtleburtle.net/bob/hash/doobs.html, function hashlittle().
* *
* This hash is designed to handle strings with an unknown length. If you * This hash is designed to handle strings with an unknown length. If you
@ -90,7 +90,7 @@ tommy_uint64_t tommy_hash_u64(tommy_uint64_t init_val, const void* void_key, tom
* Use 0 if not relevant. * Use 0 if not relevant.
* \param void_key Pointer to the string to hash. It has to be 0 terminated. * \param void_key Pointer to the string to hash. It has to be 0 terminated.
* \note * \note
* This function is endianess independent. * This function is endianness independent.
* \return The hash value of 32 bits. * \return The hash value of 32 bits.
*/ */
tommy_uint32_t tommy_strhash_u32(tommy_uint64_t init_val, const void* void_key); tommy_uint32_t tommy_strhash_u32(tommy_uint64_t init_val, const void* void_key);

View file

@ -92,7 +92,7 @@
* *
* To iterate over all the elements in the hashtable with the same key, you have to * To iterate over all the elements in the hashtable with the same key, you have to
* use tommy_hashdyn_bucket() and follow the tommy_node::next pointer until NULL. * use tommy_hashdyn_bucket() and follow the tommy_node::next pointer until NULL.
* You have also to check explicitely for the key, as the bucket may contains * You have also to check explicitly for the key, as the bucket may contains
* different keys. * different keys.
* *
* \code * \code

View file

@ -28,7 +28,7 @@
/** \file /** \file
* Double linked list for collisions into hashtables. * Double linked list for collisions into hashtables.
* *
* This list is a double linked list mainly targetted for handling collisions * This list is a double linked list mainly targeted for handling collisions
* into an hashtables, but useable also as a generic list. * into an hashtables, but useable also as a generic list.
* *
* The main feature of this list is to require only one pointer to represent the * The main feature of this list is to require only one pointer to represent the
@ -294,7 +294,7 @@ tommy_inline void tommy_list_concat(tommy_list* first, tommy_list* second)
* It's a stable merge sort with O(N*log(N)) worst complexity. * It's a stable merge sort with O(N*log(N)) worst complexity.
* It's faster on degenerated cases like partially ordered lists. * It's faster on degenerated cases like partially ordered lists.
* \param cmp Compare function called with two elements. * \param cmp Compare function called with two elements.
* The function should return <0 if the first element is less than the second, ==0 if equal, and >0 if greather. * The function should return <0 if the first element is less than the second, ==0 if equal, and >0 if greater.
*/ */
void tommy_list_sort(tommy_list* list, tommy_compare_func* cmp); void tommy_list_sort(tommy_list* list, tommy_compare_func* cmp);

View file

@ -33,7 +33,7 @@
* *
* As difference than other tommy containers, duplicate elements cannot be inserted. * As difference than other tommy containers, duplicate elements cannot be inserted.
* *
* To initialize a tree you have to call tommy_tree_init() specifing a comparison * To initialize a tree you have to call tommy_tree_init() specifying a comparison
* function that will define the order in the tree. * function that will define the order in the tree.
* *
* \code * \code
@ -123,7 +123,7 @@ typedef struct tommy_tree_struct {
/** /**
* Initializes the tree. * Initializes the tree.
* \param cmp The comparison function that defines the orderin the tree. * \param cmp The comparison function that defines the order in the tree.
*/ */
void tommy_tree_init(tommy_tree* tree, tommy_compare_func* cmp); void tommy_tree_init(tommy_tree* tree, tommy_compare_func* cmp);

View file

@ -227,7 +227,7 @@ typedef struct tommy_node_struct {
* Compare function for elements. * Compare function for elements.
* \param obj_a Pointer to the first object to compare. * \param obj_a Pointer to the first object to compare.
* \param obj_b Pointer to the second object to compare. * \param obj_b Pointer to the second object to compare.
* \return <0 if the first element is less than the second, ==0 equal, >0 if greather. * \return <0 if the first element is less than the second, ==0 equal, >0 if greater.
* *
* This function is like the C strcmp(). * This function is like the C strcmp().
* *

View file

@ -1,5 +1,5 @@
{ {
printf reports false positves when printing more than one variables at time printf reports false positives when printing more than one variables at time
exp-sgcheck:SorG exp-sgcheck:SorG
... ...
fun:printf fun:printf