badblocks.c (main): Change the default number of blocks tested

at once from 16 to 64.  (Addresses Debian bug #232240)
bitmap-optimize
Theodore Ts'o 2004-02-28 08:20:41 -05:00
parent bc69f82db8
commit 167af997e3
3 changed files with 7 additions and 15 deletions

View File

@ -1,3 +1,8 @@
2004-02-28 Theodore Ts'o <tytso@mit.edu>
* badblocks.c (main): Change the default number of blocks tested
at once from 16 to 64. (Addresses Debian bug #232240)
2004-02-26 Theodore Ts'o <tytso@mit.edu>
* filefrag.c: Fix gcc -Wall nits.

View File

@ -78,20 +78,7 @@ programs.
Specify the size of blocks in bytes.
.TP
.BI \-c " number of blocks"
is the number of blocks which are tested at a time. The default is 16.
Increasing this number will increase the efficiency of
.B badblocks
but also will increase its memory usage.
.B Badblocks
needs memory proportional to the number of blocks tested at once, in
read-only mode, proportional to twice that number in read-write mode,
and proportional to three times that number in non-destructive read-write
mode. If you set the number-of-blocks parameter to too high a value,
.B badblocks
will exit almost immediately with an out-of-memory error "while allocating
buffers". If you set it too low, however, for a non-destructive-write-mode
test, then it's possble for questionable blocks on an unreliable
hard drive to be hidden by the effects of the hard disk track buffer.
is the number of blocks which are tested at a time. The default is 64.
.TP
.B \-f
Normally, badblocks will refuse to do a read/write or a non-destructive

View File

@ -806,7 +806,7 @@ int main (int argc, char ** argv)
char * output_file = NULL;
FILE * in = NULL;
int block_size = 1024;
unsigned long blocks_at_once = 16;
unsigned long blocks_at_once = 64;
blk_t last_block, from_count;
int num_passes = 0;
int passes_clean = 0;