diff --git a/handle.c b/handle.c index af51f446..8c0223aa 100644 --- a/handle.c +++ b/handle.c @@ -269,6 +269,12 @@ int handle_read(struct snapraid_handle* handle, struct snapraid_block* block, un /* In Linux 2.6.33 it's enough to ensure that data is not kept in the cache. */ /* Better to do nothing and save a syscall for each block. */ + /* Here we cannot call posix_fadvise(..., POSIX_FADV_WILLNEED) for the next block */ + /* because it may be blocking */ + /* See Ted Ts'o comment in "posix_fadvise(POSIX_FADV_WILLNEED) waits before returning?" */ + /* at: https://lkml.org/lkml/2010/12/6/122 */ + /* We relay only on the automatic readahead triggered by POSIX_FADV_SEQUENTIAL. */ + return read_size; } diff --git a/raid.c b/raid.c index 5dcd76ca..8292d76b 100644 --- a/raid.c +++ b/raid.c @@ -221,7 +221,7 @@ void raid6_mmxr2(unsigned char** buffer, unsigned diskmax, unsigned size) q = buffer[z0+2]; /* RS qarity */ asm volatile("movq %0,%%mm0" : : "m" (raid6_mmx_constants.x1d)); - asm volatile("pxor %mm5,%mm5"); /* Zero temp */ + asm volatile("pxor %mm5,%mm5"); /* Zero temp */ asm volatile("pxor %mm7,%mm7"); /* Zero temp */ for(d=0;d Sync +.SS STEP 3 \(hy> Check +As paranoid check, you can now run a whole \(cqcheck\(cq command to ensure that +everything is OK. +.PP +.RS 4 +snapraid check +.PD 0 +.PP +.PD +.RE +.PP +This command will take a long time. +.SS STEP 4 \(hy> Sync Run the \(cqsync\(cq command to resyncronize the array with the new disk. .PP To avoid a long time sync you have to use the \(cq\(hy\(hyfind\(hyby\(hyname\(cq option to @@ -775,18 +787,6 @@ snapraid \(hy\(hyfind\(hyby\(hyname sync .RE .PP If everything was recovered, this command is immediate. -.SS STEP 4 \(hy> Check -As paranoid check, you can now run a whole \(cqcheck\(cq command to ensure that -everything is OK. -.PP -.RS 4 -snapraid check -.PD 0 -.PP -.PD -.RE -.PP -This command will take a long time. .SH CONTENT SnapRAID stores the list and checksums of your files in the content file. .PP diff --git a/snapraid.d b/snapraid.d index 71c2c7bf..e99bc71f 100644 --- a/snapraid.d +++ b/snapraid.d @@ -519,11 +519,19 @@ Recovering For example, if you have moved away some files from other disks after the last 'sync', you can retry to put them inplace, and retry the 'fix'. - If you are satisfied of the recovering, you can now proceed synching the array, + If you are satisfied of the recovering, you can now proceed further, but take care that after synching you will no more able to retry the 'fix' command! - STEP 3 -> Sync + STEP 3 -> Check + As paranoid check, you can now run a whole 'check' command to ensure that + everything is OK. + + :snapraid check + + This command will take a long time. + + STEP 4 -> Sync Run the 'sync' command to resyncronize the array with the new disk. To avoid a long time sync you have to use the '--find-by-name' option to @@ -534,14 +542,6 @@ Recovering If everything was recovered, this command is immediate. - STEP 4 -> Check - As paranoid check, you can now run a whole 'check' command to ensure that - everything is OK. - - :snapraid check - - This command will take a long time. - Content SnapRAID stores the list and checksums of your files in the content file. diff --git a/snapraid.txt b/snapraid.txt index 48466993..20cc59c6 100644 --- a/snapraid.txt +++ b/snapraid.txt @@ -569,11 +569,19 @@ If you are not satified of the recovering, you can retry it as many time you wis For example, if you have moved away some files from other disks after the last 'sync', you can retry to put them inplace, and retry the 'fix'. -If you are satisfied of the recovering, you can now proceed synching the array, +If you are satisfied of the recovering, you can now proceed further, but take care that after synching you will no more able to retry the 'fix' command! ----- 9.0.3 STEP 3 -> Sync ---- +---- 9.0.3 STEP 3 -> Check ---- +As paranoid check, you can now run a whole 'check' command to ensure that +everything is OK. + + snapraid check + +This command will take a long time. + +---- 9.0.4 STEP 4 -> Sync ---- Run the 'sync' command to resyncronize the array with the new disk. To avoid a long time sync you have to use the '--find-by-name' option to @@ -584,14 +592,6 @@ a different physical disk, and they don't need to be synched. If everything was recovered, this command is immediate. ----- 9.0.4 STEP 4 -> Check ---- -As paranoid check, you can now run a whole 'check' command to ensure that -everything is OK. - - snapraid check - -This command will take a long time. - 10 CONTENT ==========