Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Gelma authored and amadvance committed May 26, 2020
1 parent f3b3182 commit 986e9b4
Show file tree
Hide file tree
Showing 41 changed files with 89 additions and 89 deletions.
4 changes: 2 additions & 2 deletions HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ SnapRAID HISTORY
A workaround was to just run 'sync' one time with the -N,
--force-nocopy option to disable the copy detection.
* 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
===========
Expand Down Expand Up @@ -425,7 +425,7 @@ SnapRAID HISTORY
and Opteron.
* Faster RAID5 and RAID6 implementation for ARM 64 bit CPUs.
* 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.
* Sort files by inode when listing the directory. This improves
the scanning performance.
Expand Down
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ maintainer-clean-local:
CHECKFLAGS_COMMON = --test-skip-device --test-skip-self --test-force-progress --no-warnings --test-parity-limit=3333333

# --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.
CHECKFLAGS_ALPHA = $(CHECKFLAGS_COMMON) --test-force-order-alpha

Expand Down Expand Up @@ -500,7 +500,7 @@ endif
$(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "rm bench/disk1/RUN-RM" --test-expect-failure sync
echo RUN > bench/disk1/RUN-CHMOD
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 \
$(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "chmod a-r bench/disk1/RUN-CHMOD" --test-expect-failure sync; \
fi
Expand Down
12 changes: 6 additions & 6 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ with a mono thread implementation with 100.0000 files.
* Support more parity levels
It can be done with a generic computation function, using
intrinsic for SSSE3 and AVX instructions.
It would be intersting to compare performance with the hand-written
assembler functions. Eventially we can convert them to use intrinsic also.
It would be interesting to compare performance with the hand-written
assembler functions. Eventually we can convert them to use intrinsic also.
https://sourceforge.net/p/snapraid/discussion/1677233/thread/9dbd7581/

* Extend haspdeep to support the SnapRAID hash :
Expand Down Expand Up @@ -151,7 +151,7 @@ See: https://sourceforge.net/p/snapraid/discussion/1677233/thread/cdea773f/
* Allocate parity minimizing concurrent use of it
Each parity allocation should check for a parity
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.
See: https://sourceforge.net/p/snapraid/discussion/1677233/thread/1797bf7d/
+ This increase the possibility of recovering with multiple failures with not
Expand Down Expand Up @@ -182,7 +182,7 @@ allowing the user to choose where to put it.
- It won't work with disks of different size.
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,
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 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.
Expand All @@ -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 :)
https://sourceforge.net/p/snapraid/discussion/1677233/thread/b2cd9385/
- 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.

* https://sourceforge.net/p/snapraid/discussion/1677233/thread/2cb97e8a/
Expand Down Expand Up @@ -229,7 +229,7 @@ are automatically deleted.

* Checks if splitting hash/parity computation in 4K pages
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.
- We now hash first the faster disks, and this could
reduce performance as we'll have to wait for all disks.
Expand Down
4 changes: 2 additions & 2 deletions acinclude.m4
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dnl @synopsis AC_CHECK_CC_OPT(flag, ifyes, ifno)
dnl
dnl Shows a message as like "checking wether gcc accepts flag ... no"
dnl and executess ifyes or ifno.
dnl Shows a message as like "checking whether gcc accepts flag ... no"
dnl and executes ifyes or ifno.

AC_DEFUN([AC_CHECK_CC_OPT],
[
Expand Down
2 changes: 1 addition & 1 deletion cmdline/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ static int repair(struct snapraid_state* state, int rehash, unsigned pos, unsign
} else {
log_tag("recover_unsync:%u:%u: Skipped for%s%s\n", pos, n,
!something_to_recover ? " nothing to recover" : "",
!something_unsynced ? " nothing unsynched" : ""
!something_unsynced ? " nothing unsynced" : ""
);
}

Expand Down
2 changes: 1 addition & 1 deletion cmdline/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ static void state_smart(unsigned n, tommy_list* low)

/* |<##################################################################72>|####80>| */
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("time.\n");

Expand Down
8 changes: 4 additions & 4 deletions cmdline/elem.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ struct snapraid_disk {
block_off_t first_free_block;

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_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. */
Expand Down Expand Up @@ -1000,7 +1000,7 @@ int fs_check(struct snapraid_disk* disk);
* After this call you can use the par2file/par2block operations
* 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);

Expand All @@ -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
* 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);

Expand Down Expand Up @@ -1129,7 +1129,7 @@ static inline snapraid_info info_make(time_t last_access, int error, int rehash,
/**
* Extract the time information.
* 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)
{
Expand Down
2 changes: 1 addition & 1 deletion cmdline/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
* Deinitialize te InputOutput workers.
* Deinitialize the InputOutput workers.
*/
void io_done(struct snapraid_io* io);

Expand Down
4 changes: 2 additions & 2 deletions cmdline/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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!
* https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/#cQG7cx48oGH86lkI.97
Expand Down Expand Up @@ -1724,7 +1724,7 @@ int fsinfo(const char* path, int* has_persistent_inode, int* has_syncronized_har
if (has_persistent_inode)
*has_persistent_inode = 1;

/* NTFS doesn't syncronize hardlinks metadata */
/* NTFS doesn't synchronize hardlinks metadata */
if (has_syncronized_hardlinks)
*has_syncronized_hardlinks = 0;

Expand Down
2 changes: 1 addition & 1 deletion cmdline/parity.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ int parity_sync(struct snapraid_parity_handle* handle)
ret = fsync(split->f);
if (ret != 0) {
/* 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;
/* LCOV_EXCL_STOP */
}
Expand Down
2 changes: 1 addition & 1 deletion cmdline/pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ static void make_link(tommy_hashdyn* poolset, const char* pool_dir, const char*
#ifdef _WIN32
} else if (errno == EPERM) {
/* 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);
/* LCOV_EXCL_STOP */
#endif
Expand Down
2 changes: 1 addition & 1 deletion cmdline/portable.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define __USE_MINGW_ANSI_STDIO 1

/**
* Define the MSVCRT version targetting Windows Vista.
* Define the MSVCRT version targeting Windows Vista.
*/
#define __MSVCRT_VERSION__ 0x0600

Expand Down
2 changes: 1 addition & 1 deletion cmdline/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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.
* This extends also to st_size and st_nlink.
*
Expand Down
2 changes: 1 addition & 1 deletion cmdline/selftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ void selftest(void)
}
if (raid_test_par(RAID_MODE_CAUCHY, 1, 256) != 0) {
/* 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);
/* LCOV_EXCL_STOP */
}
Expand Down
14 changes: 7 additions & 7 deletions cmdline/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static void state_config_check(struct snapraid_state* state, const char* path, t
struct snapraid_disk* other = j->data;
if (disk->device == other->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 */
/* because we want to use these disks */
if (!state->opt.no_warnings)
Expand Down Expand Up @@ -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) {
if (disk->device == state->parity[l].split_map[s].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 */
/* because we want to use these disks */
if (!state->opt.no_warnings)
Expand Down Expand Up @@ -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) {
if (state->parity[l].split_map[s].device == state->parity[j].split_map[t].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 */
/* because we want to use these disks */
if (!state->opt.no_warnings)
Expand Down Expand Up @@ -631,7 +631,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
}
state->block_size *= KIBI;
} 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;

Expand Down Expand Up @@ -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.
*
* 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)
{
Expand Down Expand Up @@ -1852,7 +1852,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
if (state->block_size == 0) {
/* LCOV_EXCL_START */
decoding_error(path, f);
log_fatal("Internal incosistency due zero blocksize!\n");
log_fatal("Internal inconsistency due zero blocksize!\n");
exit(EXIT_FAILURE);
/* LCOV_EXCL_STOP */
}
Expand Down Expand Up @@ -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)) {
/* for each parity disk */
for (l = 0; l < state->level; ++l) {
Expand Down
2 changes: 1 addition & 1 deletion cmdline/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void state_rehash(struct snapraid_state* state);
*/
#define SCRUB_AUTO -1 /**< Automatic selection. */
#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_EVEN -5 /**< Even blocks. */

Expand Down
8 changes: 4 additions & 4 deletions cmdline/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/* 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);
if (f == -1) {
/* LCOV_EXCL_START */
Expand Down Expand Up @@ -363,7 +363,7 @@ int sgettok(STREAM* f, char* str, int size)
break;
}
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')
--i;
sungetc(c, f);
Expand Down Expand Up @@ -429,7 +429,7 @@ int sgetline(STREAM* f, char* str, int size)
while (1) {
c = *pos++;
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')
--i;
--pos;
Expand All @@ -455,7 +455,7 @@ int sgetline(STREAM* f, char* str, int size)
/* LCOV_EXCL_STOP */
}
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')
--i;
sungetc(c, f);
Expand Down
14 changes: 7 additions & 7 deletions cmdline/support.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ int mkancestor(const char* file)
}

#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) {
/* nothing more to do */
return 0;
Expand Down Expand Up @@ -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
* callback/continuation scheme). My worry is just doing this if a user
* 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
* 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
Expand Down Expand Up @@ -1633,16 +1633,16 @@ void thread_cond_wait(pthread_cond_t* cond, pthread_mutex_t* mutex)
/**
* Implementation note about conditional variables.
*
* The conditional variables can be signaled inside or ouside the mutex,
* what is better it's debatable but in general doing that 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 outside the mutex,
* 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 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),
* to be on the safe side and avoid any difference in beaviour between test and
* test mode (with CHECKER defined) and release mode (CHECKER not defined),
* to be on the safe side and avoid any difference in behaviour between test and
* release.
*
* Here some interesting discussion:
Expand Down
4 changes: 2 additions & 2 deletions cmdline/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
/* 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 */
if (!error_on_this_block && !io_error_on_this_block && silent_error_on_this_block) {
unsigned failed_mac;
Expand Down Expand Up @@ -1536,7 +1536,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
data_off_t out_size;
parity_size(&parity_handle[l], &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);
/* LCOV_EXCL_STOP */
}
Expand Down
2 changes: 1 addition & 1 deletion cmdline/unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
/* that at least keeps files in the same directory together. */
/* 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 */
/* of the disk. */
*physical = FILEPHY_UNREPORTED_OFFSET;
Expand Down
Loading

0 comments on commit 986e9b4

Please sign in to comment.