Fixes some comments.

This commit is contained in:
Andrea Mazzoleni 2013-07-30 20:49:08 +02:00
parent d8870cdd42
commit 30fabb7d50
3 changed files with 15 additions and 11 deletions

14
elem.h
View file

@ -710,7 +710,7 @@ static inline snapraid_info info_make(time_t last_access, int error, int rehash)
}
/**
* Extract the time information.
* Extracts the time information.
* This is the last time when the block was know to be correct.
*/
static inline time_t info_get_time(snapraid_info info)
@ -719,8 +719,8 @@ static inline time_t info_get_time(snapraid_info info)
}
/**
* Extract the error information.
* This report if the block address is reporting to have some problem.
* Extracts the error information.
* Reports if the block address had some problem.
*/
static inline int info_get_bad(snapraid_info info)
{
@ -728,8 +728,8 @@ static inline int info_get_bad(snapraid_info info)
}
/**
* Extract the error information.
* This report if the block address is reporting to have some problem.
* Extracts the rehash information.
* Reports if the block address is using the old hash and needs to be rehashed.
*/
static inline int info_get_rehash(snapraid_info info)
{
@ -737,7 +737,7 @@ static inline int info_get_rehash(snapraid_info info)
}
/**
* Mark the block address as with error.
* Marks the block address as with error.
*/
static inline snapraid_info info_set_bad(snapraid_info info)
{
@ -746,7 +746,7 @@ static inline snapraid_info info_set_bad(snapraid_info info)
/**
* Mark the block address as with rehash.
* Marks the block address as with rehash.
*/
static inline snapraid_info info_set_rehash(snapraid_info info)
{

4
scan.c
View file

@ -676,8 +676,8 @@ static int scan_dir(struct snapraid_scan* scan, struct snapraid_state* state, in
} else if (S_ISDIR(st.st_mode)) {
if (filter_dir(&state->filterlist, disk->name, sub_next) == 0) {
#ifndef _WIN32
/* in unix don't follow mount points in different devices */
/* in windows, it's not clear how to check that */
/* in Unix don't follow mount points in different devices */
/* in Windows we are already skipping them reporting them as special files */
if (st.st_dev != disk->device) {
fprintf(stderr, "warning: Ignoring mount point '%s' because it appears to be in a different device\n", path_next);
} else

View file

@ -150,7 +150,7 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
++autosavedone;
--autosavemissing;
/* by default process the block, and skip it if something go wrong */
/* by default process the block, and skip it if something goes wrong */
error_on_this_block = 0;
silent_error_on_this_block = 0;
@ -202,6 +202,10 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
continue;
}
/* note that we intentionally don't check if the file has different attributes */
/* from the last sync, as we are expected to return errors if running */
/* in an unsynched array. This is just like the check command. */
read_size = handle_read(&handle[j], block, buffer[j], state->block_size, stderr);
if (read_size == -1) {
fprintf(stdlog, "error:%u:%s:%s: Read error at position %u\n", i, handle[j].disk->name, block_file_get(block)->sub, block_file_pos(block));
@ -288,7 +292,7 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
if (error_on_this_block) {
/* do nothing, as this is a generic error */
/* maybe just caused by a not synched array */
/* likely caused by a not synched array */
} else if (silent_error_on_this_block) {
/* set the error status keeping the existing time and hash */
info_set(&state->infoarr, i, info_set_bad(info));