badblocks 的手册页似乎没有特别提到输出中的三个数字的含义:
通过完成,发现 7 个坏块(7/0/0 错误)
通过完成,发现 120 个坏块(0/0/120 错误)
我猜是“读/写/比较时出错”。有人可以启发我吗?
fro*_*utz 57
你的猜测是正确的。
源代码如下所示:
if (v_flag)
fprintf(stderr,
_("Pass completed, %u bad blocks found. (%d/%d/%d errors)\n"),
bb_count, num_read_errors, num_write_errors, num_corruption_errors);
Run Code Online (Sandbox Code Playgroud)
所以它的读/写/损坏错误。损坏意味着与以前写入的数据进行比较:
if (t_flag) {
/* test the comparison between all the
blocks successfully read */
int i;
for (i = 0; i < got; ++i)
if (memcmp (blkbuf+i*block_size,
blkbuf+blocks_at_once*block_size,
block_size))
bb_count += bb_output(currently_testing + i, CORRUPTION_ERROR);
}
Run Code Online (Sandbox Code Playgroud)