From: Theodore Ts'o Date: Sat, 28 Feb 2004 13:20:41 +0000 (-0500) Subject: badblocks.c (main): Change the default number of blocks tested X-Git-Tag: E2FSPROGS-1_35~3 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=167af997e3a8fb36cb9fc8db9c40fb62a7f9464b;p=tools%2Fe2fsprogs.git badblocks.c (main): Change the default number of blocks tested at once from 16 to 64. (Addresses Debian bug #232240) --- diff --git a/misc/ChangeLog b/misc/ChangeLog index 30f2e4e..de75bc4 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +2004-02-28 Theodore Ts'o + + * 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 * filefrag.c: Fix gcc -Wall nits. diff --git a/misc/badblocks.8.in b/misc/badblocks.8.in index b933fd1..f70db46 100644 --- a/misc/badblocks.8.in +++ b/misc/badblocks.8.in @@ -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 diff --git a/misc/badblocks.c b/misc/badblocks.c index 3a23060..838bbcb 100644 --- a/misc/badblocks.c +++ b/misc/badblocks.c @@ -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;