On Sunday July 2, [email protected] wrote:
> BUG: warning at drivers/md/md.c:411/super_written_barrier()
>
> Call Trace:
> <IRQ> [<ffffffff80422231>] super_written_barrier+0x61/0x100
> [<ffffffff8023c000>] bio_endio+0x5a/0x6a
> [<ffffffff8022e24f>] __end_that_request_first+0x16f/0x4c9
> [<ffffffff8024afaa>] end_that_request_first+0xc/0xe
> [<ffffffff8034e825>] blk_ordered_complete_seq+0x7d/0x8c
> [<ffffffff8034e864>] post_flush_end_io+0x30/0x35
> [<ffffffff8034e748>] end_that_request_last+0xd8/0xf4
> [<ffffffff803d83a1>] scsi_end_request+0xb1/0xdd
> [<ffffffff803d87cd>] scsi_io_completion+0x3cd/0x3dc
I think the key decision to return an error is happening here in
scsi_io_completion.
Pooring over a disassembly might help show here, but sticking in a
bunch of printks is probably easier (for someone like me who has never
seen this code before anyway :-)
What does this patch produce?
NeilBrown
Signed-off-by: Neil Brown <[email protected]>
diff .prev/drivers/scsi/scsi_lib.c ./drivers/scsi/scsi_lib.c
--- .prev/drivers/scsi/scsi_lib.c 2006-07-01 23:22:46.000000000 +1000
+++ ./drivers/scsi/scsi_lib.c 2006-07-01 23:26:18.000000000 +1000
@@ -952,6 +952,7 @@ void scsi_io_completion(struct scsi_cmnd
* and quietly refuse further access.
*/
cmd->device->changed = 1;
+ printk("Unit Attention\n");
scsi_end_request(cmd, 0, this_count, 1);
return;
} else {
@@ -984,6 +985,8 @@ void scsi_io_completion(struct scsi_cmnd
scsi_requeue_command(q, cmd);
return;
} else {
+ printk("Illegal Request %d %d %d\n",
+ sshdr.asc, sshdr.ascq, cmd->cmnd[0]);
scsi_end_request(cmd, 0, this_count, 1);
return;
}
@@ -1012,6 +1015,7 @@ void scsi_io_completion(struct scsi_cmnd
"Device not ready: ");
scsi_print_sense_hdr("", &sshdr);
}
+ printk("Not ready\n");
scsi_end_request(cmd, 0, this_count, 1);
return;
case VOLUME_OVERFLOW:
@@ -1022,6 +1026,7 @@ void scsi_io_completion(struct scsi_cmnd
scsi_print_sense("", cmd);
}
/* See SSC3rXX or current. */
+ printk("Volume Overflow\n");
scsi_end_request(cmd, 0, this_count, 1);
return;
default:
@@ -1045,6 +1050,10 @@ void scsi_io_completion(struct scsi_cmnd
scsi_print_sense("", cmd);
}
}
+ printk("ouch. %d %d %d %d %d %d %d\n",
+ good_bytes, sense_valid, sense_deferred,
+ sshdr.sense_key, sshdr.asc, sshdr.ascq,
+ result);
scsi_end_request(cmd, 0, this_count, !result);
}
EXPORT_SYMBOL(scsi_io_completion);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]