10/02/08 11:18:48 f7PO4axi
>>543
>単に、このread/write/verificationに合わせて、
>読み取りテスト/書き込みテスト/読み取りテストをやっているのかな?
URLリンク(en.wikipedia.org)
のC5の説明:
Number of "unstable" sectors
(waiting to be remapped, because of read errors).
If an unstable sector is subsequently written or read successfully,
this value is decreased and the sector is not remapped.
Read errors on a sector will not remap the sector
(since it might be readable later);
instead, the drive firmware remembers that the sector needs to be remapped,
and remaps it the next time it's written.
そもそもread errorsがあるということだから、
書き込みテストをする以前に不良セクタの候補として認識する必要があるということのようだね。
それで最初のExtended Testは必要ということになるっぽい。
「ゼロフィルで代替されると初期不良セクタが分からなくなるから」という理由ではなさそうだね。
そうすると、理想的な念入りテストは
1.FFフィル
2.Extended Test
3.00フィル
4.Extended Test
ということかな。(2~4でread/write/readとなる)
Linuxだとbadblocks -w -t 0xff -t 0x00で一元的にテストできるらしい。
badblocksのmanページに
「test_patternは 0 以上 ULONG_MAX-1 以下の数値でも文字列 "random" でもよい」
としか書かれていなくて、ULONG_MAX-1なら0xfffffffeとか指定しなくてはならないのではないかと思ったけど、
グーグルで検索した限りではそういう指定をしている人はいなくて、ソースコードを見てみると、
badblocksのパターンの解釈には、
parse_uint関数内でstrtoul関数により処理され、
parse_uint関数の戻り値はunsigned intになっていて、
その後0xffffになり、
最終的にはpattern_fill関数内でpattern & 0xFFのように
unsigned char単位で処理されているようだから、
0xffという指定の仕方で良いらしい。(これだとグーグルできちんと出てくるw)