SCSI错误定位:hostbyte和driverbyte
1. 错误打印log 硬盘跑IO的时候,经常会见到下面这种错误log,这是SCSI做的打印。这是什么错误?该怎么定位? [ 6304.176111] sd 0:0:4:0: [sde] tag#7 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00 [ 6304.184281] sd 0:0:4:0: [sde] tag#7 CDB: opcode=0x28 28 00 00 0a 88 00 00 04 00 00 [ 6304.191838] print_req_error: I/O error, dev sde, sector 690176 [ 6333.587832] sd 0:0:4:0: [sde] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x05 driverbyte=0x00 [ 6333.596010] sd 0:0:4:0: [sde] tag#0 CDB: opcode=0x28 28 00 00 0a 8c 00 00 04 00 00 2. log打印位置 首先,我们看这个日志是在哪里打印的。drivers/scsi/scsi_lib.c中scsi_io_completion()。两行分别对应scsi_print_result()和scsi_print