I've slightly modified the trace-code to try and report the name of the callback function in the block I/O request (struct request.end_io) but unfortunately its null.
Any suggestions on how to find out what process/function put the job in the queue, hopefully without logging *every* job added, would be useful.
The trace shows:
Trace: hde attempting to read sector address 135202804
Trace: Call back function address end_io 00000000
Trace: Call back function name 0x0<7>Trace: Trying to force a stack trace
[<c010482d>] show_trace+0xd/0x10
[<c0104ed7>] dump_stack+0x17/0x20
[<f882cab4>] ide_do_rw_disk+0x1c4/0x690 [ide_disk]
[<c02504a7>] ide_do_request+0x6c7/0x8c0
[<c02509b9>] do_ide_request+0x19/0x20
[<c01ddcbc>] cfq_kick_queue+0x5c/0xc0
[<c0132652>] run_workqueue+0x72/0xf0
[<c0133288>] worker_thread+0x118/0x140
[<c0135fd7>] kthread+0xa7/0xd0
[<c0101005>] kernel_thread_helper+0x5/0x10
hde: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hde: dma_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
and the code in drivers/ide/ide-disk.c now reads:
/* report when suspect sector numbers are addressed */
unsigned int bad_index;
if ( strcmp(drive->name,"hde") == 0) { /* is it one of the affected drives? */
/* make it easy to compare the known sector addresses */
sector_t bad_address[8] = {135202804ULL, 135202808ULL, 135202972ULL, 135202976ULL, 135203028ULL, 135203032ULL, 135203036ULL, 135203040ULL };
/* simple loop to compare current sector request with known bad sector addresses */
for (bad_index = 0; bad_index < 8; bad_index++) {
if (block == bad_address[bad_index]) { /* force a stack-trace */
if (printk_ratelimit()) {
printk(KERN_DEBUG "Trace: %s attempting to read sector address %lld\n",drive->name, bad_address[bad_index]);
printk(KERN_DEBUG "Trace: Call back function address end_io %08lx\n",(unsigned long) rq->end_io);
print_symbol("Trace: Call back function name %s\n", (unsigned long) rq->end_io);
printk(KERN_DEBUG "Trace: Trying to force a stack trace\n");
dump_stack();
break;
}
}
}
}
/* end of call-trace */
I've slightly modified the trace-code to try and report the name of the callback function in the block I/O request (struct request.end_io) but unfortunately its null.
Any suggestions on how to find out what process/function put the job in the queue, hopefully without logging *every* job added, would be useful.
The trace shows:
Trace: hde attempting to read sector address 135202804 0x17/0x20 rw_disk+ 0x1c4/0x690 [ide_disk] request+ 0x6c7/0x8c0 request+ 0x19/0x20 queue+0x5c/ 0xc0 0x72/0xf0 thread+ 0x118/0x140 thread_ helper+ 0x5/0x10
Trace: Call back function address end_io 00000000
Trace: Call back function name 0x0<7>Trace: Trying to force a stack trace
[<c010482d>] show_trace+0xd/0x10
[<c0104ed7>] dump_stack+
[<f882cab4>] ide_do_
[<c02504a7>] ide_do_
[<c02509b9>] do_ide_
[<c01ddcbc>] cfq_kick_
[<c0132652>] run_workqueue+
[<c0133288>] worker_
[<c0135fd7>] kthread+0xa7/0xd0
[<c0101005>] kernel_
hde: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hde: dma_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
and the code in drivers/ ide/ide- disk.c now reads:
/* report when suspect sector numbers are addressed */ drive-> name,"hde" ) == 0) { /* is it one of the affected drives? */
135203028ULL, 135203032ULL, 135203036ULL, 135203040ULL };
unsigned int bad_index;
if ( strcmp(
/* make it easy to compare the known sector addresses */
sector_t bad_address[8] = {135202804ULL, 135202808ULL, 135202972ULL, 135202976ULL,
/* simple loop to compare current sector request with known bad sector addresses */ bad_index] ) { /* force a stack-trace */ ratelimit( )) { KERN_DEBUG "Trace: %s attempting to read sector address %lld\n" ,drive- >name, bad_address[ bad_index] ); KERN_DEBUG "Trace: Call back function address end_io %08lx\n",(unsigned long) rq->end_io); symbol( "Trace: Call back function name %s\n", (unsigned long) rq->end_io); KERN_DEBUG "Trace: Trying to force a stack trace\n");
for (bad_index = 0; bad_index < 8; bad_index++) {
if (block == bad_address[
if (printk_
printk(
printk(
print_
printk(
dump_stack();
break;
}
}
}
}
/* end of call-trace */