mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Fix typos in comments
No functional change.
This commit is contained in:
parent
cdc0a1cd93
commit
20cd1f86f8
8 changed files with 15 additions and 15 deletions
|
|
@ -486,7 +486,7 @@ static double smart_afr(uint64_t* smart)
|
|||
|
||||
if (smart[188] != SMART_UNASSIGNED) {
|
||||
/* with Seagate disks, there are three different 16 bits value reported */
|
||||
/* the lowest one is the most significative */
|
||||
/* the lowest one is the most significant */
|
||||
double r = smart_afr_value(SMART_188_R, SMART_188_STEP, smart[188] & mask16);
|
||||
if (afr < r)
|
||||
afr = r;
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ struct snapraid_disk {
|
|||
* Mutex for protecting the filesystem structure.
|
||||
*
|
||||
* Specifically, this protects ::fs_parity, ::fs_file, and ::fs_last,
|
||||
* meaning that it protectes only extents.
|
||||
* meaning that it protects only extents.
|
||||
*
|
||||
* Files, links and dirs are not protected as they are not expected to
|
||||
* change during multithread processing.
|
||||
|
|
@ -605,7 +605,7 @@ static inline int hash_is_zero(const unsigned char* hash)
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if the specified hash is uniquievocally repesenting the data.
|
||||
* Check if the specified hash is unequivocally representing the data.
|
||||
*
|
||||
* If working with reduced hash lengths, this function always return 0.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ int exit_sync_needed;
|
|||
#define EXIT_SYNC_NEEDED exit_sync_needed
|
||||
|
||||
/**
|
||||
* Fill memory with psudeo-random values.
|
||||
* Fill memory with pseudo-random values.
|
||||
*/
|
||||
int randomize(void* ptr, size_t size);
|
||||
|
||||
|
|
|
|||
|
|
@ -1990,7 +1990,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
|||
}
|
||||
|
||||
/* if the block contains a hash of past data */
|
||||
/* and we are clearing such undeterminated hashes */
|
||||
/* and we are clearing such indeterminate hashes */
|
||||
if (state->clear_past_hash
|
||||
&& block_has_past_hash(block)
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ unsigned split(char** split_map, unsigned split_max, char* str, const char* deli
|
|||
{
|
||||
unsigned mac = 0;
|
||||
|
||||
/* skip initial delimiers */
|
||||
/* skip initial delimiters */
|
||||
str += strspn(str, delimiters);
|
||||
|
||||
while (*str != 0 || mac == split_max) {
|
||||
|
|
@ -808,7 +808,7 @@ int mkancestor(const char* file)
|
|||
* the EEXIST error because the call will fail with ERROR_WRITE_PROTECTED.
|
||||
*
|
||||
* Also in Windows it's better to use lstat() than stat() because it
|
||||
* doen't need to open the dir with CreateFile().
|
||||
* doesn't need to open the dir with CreateFile().
|
||||
*/
|
||||
if (lstat(dir, &st) == 0) {
|
||||
/* it already exists */
|
||||
|
|
@ -984,7 +984,7 @@ int advise_write(struct advise_struct* advise, int f, data_off_t offset, data_of
|
|||
* Linus "Unexpected splice "always copy" behavior observed"
|
||||
* http://thread.gmane.org/gmane.linux.kernel/987247/focus=988176
|
||||
* ---
|
||||
* The behavior for dirty page writeback is _not_ welldefined, and
|
||||
* The behavior for dirty page writeback is _not_ well defined, and
|
||||
* if you do POSIX_FADV_DONTNEED, I would suggest you do it as part of that
|
||||
* writeback logic, ie you do it only on ranges that you have just waited on.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ end:
|
|||
state_progress_end(state, countpos, countmax, countsize);
|
||||
|
||||
/* note that at this point no io_error is possible */
|
||||
/* becasue at the first one we bail out */
|
||||
/* because at the first one we bail out */
|
||||
assert(io_error == 0);
|
||||
|
||||
if (error || io_error || silent_error) {
|
||||
|
|
@ -495,8 +495,8 @@ static void sync_data_reader(struct snapraid_worker* worker, struct snapraid_tas
|
|||
/* get the block */
|
||||
task->block = fs_par2block_find(disk, blockcur);
|
||||
|
||||
/* if the block has no file, meanining that it's EMPTY or DELETED, */
|
||||
/* it doesn't partecipate in the new parity computation */
|
||||
/* if the block has no file, meaning that it's EMPTY or DELETED, */
|
||||
/* it doesn't participate in the new parity computation */
|
||||
if (!block_has_file(task->block)) {
|
||||
/* use an empty block */
|
||||
memset(buffer, 0, state->block_size);
|
||||
|
|
@ -983,7 +983,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
/* have "parity_needs_to_be_updated" already at 1 */
|
||||
assert(block_state_get(block) == BLOCK_STATE_CHG);
|
||||
|
||||
/* if the hash represents the data uniquievocally */
|
||||
/* if the hash represents the data unequivocally */
|
||||
if (hash_is_unique(block->hash)) {
|
||||
/* check if the hash is changed */
|
||||
if (memcmp(hash, block->hash, BLOCK_HASH_SIZE) != 0) {
|
||||
|
|
@ -1193,7 +1193,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
if (parity_needs_to_be_updated
|
||||
&& !silent_error_on_this_block
|
||||
) {
|
||||
/* if rehash is neeed */
|
||||
/* if rehash is needed */
|
||||
if (rehash) {
|
||||
/* store all the new hash already computed */
|
||||
for (j = 0; j < diskmax; ++j) {
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ static int devdereference(uint64_t device, uint64_t* new_device)
|
|||
char path[PATH_MAX];
|
||||
struct stat st;
|
||||
|
||||
/* use the proc interface to get the device containinig the filesystem */
|
||||
/* use the proc interface to get the device containing the filesystem */
|
||||
if (devresolve_proc(device, path, sizeof(path)) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ void* malloc_nofail_test(size_t size)
|
|||
/**
|
||||
* Fast memory test.
|
||||
*
|
||||
* It's similat at raid_mtest_vector() but faster because
|
||||
* It's similar at raid_mtest_vector() but faster because
|
||||
* we have a lot of buffers to verify.
|
||||
*/
|
||||
static int fast_mtest_vector(int n, size_t size, void** vv)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue