Bug 4853

Summary: pf: Oops with Imation SuperDisk
Product: Drivers Reporter: Alexey Dobriyan (adobriyan)
Component: ParallelAssignee: drivers_parallel
Status: CLOSED CODE_FIX    
Severity: normal CC: akpm, axboe, bunk, linux
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.12 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Clear pf_req when ended
Version that compiles
Yet another typo fix

Description Alexey Dobriyan 2005-07-06 05:23:45 UTC
From: Ondrej Zary <linux@rainbow-software.org>
http://marc.theaimsgroup.com/?t=112039162500004&r=1&w=2

I've tried to use my external Imation SuperDisk parallel port drive in Linux
2.6.12 but failed. The drive is detected properly but when I try to mount a
floppy, I get errors (they look like timeouts), the system is unresponsive
(even framebuffer cursor stops blinking) and then it oopses (see below). Also
when I configure the port to ECP/EPP in BIOS, the driver is unable to use any
EPP mode (uses 8-bit and the oops is the same).

sh-3.00# /sbin/modprobe paride
sh-3.00# /sbin/modprobe epat
paride: epat registered as protocol 0
sh-3.00# /sbin/modprobe pf verbose=1 drive0=0x378
pf: pf version 1.04, major 47, cluster 64, nice 0
pf0: 0x378 is parport0
pf0: epat: port 0x378, mode 0, ccr 0, test=(0,256,0)
pf0: epat: port 0x378, mode 1, ccr 40, test=(224,256,448)
pf0: epat: port 0x378, mode 2, ccr 0, test=(0,256,0)
pf0: epat: port 0x378, mode 3, ccr 0, test=(0,256,0)
pf0: epat: port 0x378, mode 4, ccr 0, test=(0,256,0)
pf0: epat: port 0x378, mode 5, ccr 0, test=(0,256,0)
pf0: Sharing parport0 at 0x378
pf0: epat 1.02, Shuttle EPAT chip c6 at 0x378, mode 5 (EPP-32), delay 1
pf0: Reset (1) signature =   1  1  1 14 eb
pf0: MATSHITA LS-120 COSM 04, master LUN 0, type 0, removable, 2880 blocks
sh-3.00# /sbin/mount /dev/pf0 /mnt/floppy/ -t vfat
pf0: MATSHITA LS-120 COSM 04, master LUN 0, type 0, removable, 2880 blocks
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
sh-3.00# ------------[ cut here ]------------
kernel BUG at <bad filename>:54507!
invalid operand: 0000 [#1]
PREEMPT
Modules linked in: pf epat paride
CPU:    0
EIP:    0060:[<c0236967>]    Not tainted VLI
EFLAGS: 00010046   (2.6.12-pentium)
EIP is at end_request+0x47/0x50
eax: 00000000   ebx: c7e43a24   ecx: 00000000   edx: c7e43a24
esi: 00000246   edi: c8822c24   ebp: 00000246   esp: c7f93f34
ds: 007b   es: 007b   ss: 0068
Process events/0 (pid: 3, threadinfo=c7f92000 task=c7fc3020)
Stack: c7f92000 c8821232 00000247 c88211b0 c88200e8 00000000 c8822c20 c7f92000
        c012016a c113c818 00000000 c8820090 c7f92000 c113c808 c113c800 ffffffff
        ffffffff 00000001 00000000 c010eb50 00010000 00000000 c0305e0a c7f93fc4
Call Trace:
  [<c8821232>] do_pf_read_drq+0x82/0x130 [pf]
  [<c88211b0>] do_pf_read_drq+0x0/0x130 [pf]
  [<c88200e8>] ps_tq_int+0x58/0xd0 [pf]
  [<c012016a>] worker_thread+0x1ba/0x290
  [<c8820090>] ps_tq_int+0x0/0xd0 [pf]
  [<c010eb50>] default_wake_function+0x0/0x10
  [<c0305e0a>] schedule+0x31a/0x5f0
  [<c010eb50>] default_wake_function+0x0/0x10
  [<c011ffb0>] worker_thread+0x0/0x290
  [<c0123e74>] kthread+0x94/0xa0
  [<c0123de0>] kthread+0x0/0xa0
  [<c0100c1d>] kernel_thread_helper+0x5/0x18
Code: da 74 28 8b 43 04 89 42 04 89 5b 04 89 10 89 1b 8b 43 54 85 c0 75 08 89 d8
5b e9 05 ff ff ff 8b 43 50 89 da e8 eb c0 ff ff eb ec <0f> 0b eb d4 90 8d 74 26
00 57
  <6>note: events/0[3] exited with preempt_count 1
Comment 1 Andrew Morton 2005-07-06 12:07:17 UTC
Are you able to identify an earlier version of 2.6.x whcih worked
OK?
Comment 2 Ondrej Zary 2005-07-07 13:32:38 UTC
No, it's broken even in 2.6.0:
------------[ cut here ]------------
kernel BUG at include/linux/blkdev.h:550!
invalid operand: 0000 [#1]
CPU:    0
EIP:    0060:[<c021cba9>]    Not tainted
EFLAGS: 00010046
EIP is at end_request+0x59/0x70
eax: 02f00100   ebx: c7330968   ecx: c7b0c0e0   edx: c7330968
esi: 00000246   edi: c905f8a0   ebp: c1170000   esp: c1171f54
ds: 007b   es: 007b   ss: 0068
Process events/0 (pid: 3, threadinfo=c1170000 task=c117ac80)
Stack: c1170000 c905e39e c7330968 00000001 00000247 c905e310 c905d0f8 00000000
       c7fedc20 00000000 c0127113 00000000 c7fedc38 c7fedc30 00000000 c905d0a0
       c7fedc28 c1170000 c7fedc20 00000001 00000000 c0115860 00010000 00000000
Call Trace:
 [<c905e39e>] do_pf_read_drq+0x8e/0x150 [pf]
 [<c905e310>] do_pf_read_drq+0x0/0x150 [pf]
 [<c905d0f8>] ps_tq_int+0x58/0xd0 [pf]
 [<c0127113>] worker_thread+0x1c3/0x2c0
 [<c905d0a0>] ps_tq_int+0x0/0xd0 [pf]
 [<c0115860>] default_wake_function+0x0/0x20
 [<c0108e06>] ret_from_fork+0x6/0x20
 [<c0115860>] default_wake_function+0x0/0x20
 [<c0126f50>] worker_thread+0x0/0x2c0
 [<c0107035>] kernel_thread_helper+0x5/0x10

Code: 0f 0b 26 02 fe 7c 32 c0 eb cd 8d b6 00 00 00 00 8d bc 27 00
 <6>note: events/0[3] exited with preempt_count 1
FAT: invalid media value (0x00)
VFS: Can't find a valid FAT filesystem on dev pf0.
pf0: lock before command: alt=0x58 stat=0x58 err=0x100 loop=16001 phase=2
pf0: Request sense before command: alt=0x58 stat=0x58 err=0x100 loop=16001 phase=2
pf0: identify before command: alt=0x58 stat=0x58 err=0x100 loop=16001 phase=2
pf0: Sense key: b, ASC: 4a, ASQ: 0
Comment 3 Ondrej Zary 2005-07-09 08:20:55 UTC
It works fine with 2.4.31 kernel.
Comment 4 Ondrej Zary 2005-07-19 10:08:43 UTC
When I was playing with the driver some time ago, it corrupted entire /etc
directory (all files in lost+found after fsck with numbers instead of names -
very funny thing to fix), but I had no evidence.
Now I've been playing with the driver again (adding debug printks) and it
corrupted my ext3fs (see the log). This time it hit only some unneeded files
(which I haven't touched for couple of months).
Looks like the driver (might be pf, epat or paride) is doing something really bad.

Entering pf_init
Entering pf_init_units
Leaving pf_init_units
Entering pf_detect
pf: pf version 1.04, major 47, cluster 64, nice 0
pf0: Sharing parport0 at 0x378
pf0: epat 1.02, Shuttle EPAT chip c6 at 0x378, mode 5 (EPP-32), delay 1
Entering pf_probe
Entering pf_reset
Entering pf_sleep
Leaving pf_sleep at 563
Leaving pf_reset at 602
Entering pf_identify
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Entering xs
Leaving xs at 635
Entering xs
Leaving xs at 635
Entering pf_mode_sense
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 428
Entering pf_wait
Leaving pf_wait at 428
Leaving pf_completion at 491
Entering pf_req_sense
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_req_sense at 512
Leaving pf_atapi at 528
Leaving pf_mode_sense at 618
Entering pf_mode_sense
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 428
Entering pf_wait
Leaving pf_wait at 428
Leaving pf_completion at 491
Entering pf_req_sense
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_req_sense at 512
Leaving pf_atapi at 528
Leaving pf_mode_sense at 618
Entering pf_mode_sense
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Leaving pf_mode_sense at 618
Entering pf_get_capacity
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Entering xl
Leaving xl at 647
Entering xl
Leaving xl at 647
Leaving pf_get_capacity at 673
pf0: MATSHITA LS-120 COSM 04, master LUN 0, type 0, removable, RO, 2880 blocks
Leaving pf_identify at 725
Leaving pf_probe at 746
Leaving pf_detect at 806
Leaving pf_init at 1106
Entering pf_open
Entering pf_identify
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Entering xs
Leaving xs at 635
Entering xs
Leaving xs at 635
Entering pf_mode_sense
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Leaving pf_mode_sense at 618
Entering pf_mode_sense
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Leaving pf_mode_sense at 618
Entering pf_mode_sense
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Leaving pf_mode_sense at 618
Entering pf_get_capacity
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Entering xl
Leaving xl at 647
Entering xl
Leaving xl at 647
Leaving pf_get_capacity at 673
pf0: MATSHITA LS-120 COSM 04, master LUN 0, type 0, removable, RO, 2880 blocks
Leaving pf_identify at 725
Leaving pf_open at 314
Entering pf_open
Entering pf_identify
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Entering xs
Leaving xs at 635
Entering xs
Leaving xs at 635
Entering pf_mode_sense
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Leaving pf_mode_sense at 618
Entering pf_mode_sense
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Leaving pf_mode_sense at 618
Entering pf_mode_sense
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Leaving pf_mode_sense at 618
Entering pf_get_capacity
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Entering xl
Leaving xl at 647
Entering xl
Leaving xl at 647
Leaving pf_get_capacity at 673
pf0: MATSHITA LS-120 COSM 04, master LUN 0, type 0, removable, RO, 2880 blocks
Leaving pf_identify at 725
Entering pf_lock
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Leaving pf_lock at 541
Leaving pf_open at 322
Entering do_pf_request
Entering do_pf_read
Leaving do_pf_read at 937
Leaving do_pf_request at 888
Entering do_pf_read_start
Entering pf_start
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Leaving pf_start at 838
Leaving do_pf_read_start at 960
Entering do_pf_read_drq
Entering pf_wait
Leaving pf_wait at 431
Entering pf_next_buf
Leaving pf_next_buf at 902
Entering pf_wait
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
Leaving pf_wait at 428
Entering pf_next_buf
Entering do_pf_request
Leaving do_pf_request at 854
Leaving pf_next_buf at 914
Entering next_request
Entering do_pf_request
Leaving do_pf_request at 860
Entering do_pf_request
Entering do_pf_read
Leaving do_pf_read at 937
Leaving do_pf_request at 888
Leaving next_request at 929
Leaving do_pf_read_drq at 987
Entering do_pf_read_start
Entering pf_start
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Leaving pf_start at 838
Leaving do_pf_read_start at 960
Entering do_pf_read_drq
Entering pf_wait
Leaving pf_wait at 431
Entering pf_next_buf
Leaving pf_next_buf at 902
Entering pf_wait
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
Leaving pf_wait at 428
Entering pf_next_buf
Entering do_pf_request
Leaving do_pf_request at 854
Leaving pf_next_buf at 914
Entering next_request
Entering do_pf_request
Leaving do_pf_request at 860
Entering do_pf_request
Entering do_pf_read
Leaving do_pf_read at 937
Leaving do_pf_request at 888
Leaving next_request at 929
Leaving do_pf_read_drq at 987
Entering do_pf_read_start
Entering pf_start
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Leaving pf_start at 838
Leaving do_pf_read_start at 960
Entering do_pf_read_drq
Entering pf_wait
Leaving pf_wait at 431
Entering pf_next_buf
Leaving pf_next_buf at 902
Entering pf_wait
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
Leaving pf_wait at 428
Entering pf_next_buf
Entering do_pf_request
Leaving do_pf_request at 854
Leaving pf_next_buf at 914
Entering next_request
Entering do_pf_request
Leaving do_pf_request at 860
Entering do_pf_request
Entering do_pf_read
Leaving do_pf_read at 937
Leaving do_pf_request at 888
Leaving next_request at 929
Leaving do_pf_read_drq at 987
Entering do_pf_read_start
Entering pf_start
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Leaving pf_start at 838
Leaving do_pf_read_start at 960
Entering do_pf_read_drq
Entering pf_wait
Leaving pf_wait at 431
Entering pf_next_buf
Leaving pf_next_buf at 902
Entering pf_wait
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
Leaving pf_wait at 428
Entering pf_next_buf
Entering do_pf_request
Leaving do_pf_request at 854
Leaving pf_next_buf at 914
Entering next_request
Entering do_pf_request
Leaving do_pf_request at 860
Entering do_pf_request
Entering do_pf_read
Leaving do_pf_read at 937
Leaving do_pf_request at 888
Leaving next_request at 929
Leaving do_pf_read_drq at 987
Entering do_pf_read_start
Entering pf_start
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Leaving pf_start at 838
Leaving do_pf_read_start at 960
Entering do_pf_read_drq
Entering pf_wait
Leaving pf_wait at 431
Entering pf_next_buf
Leaving pf_next_buf at 902
Entering pf_wait
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
Leaving pf_wait at 428
Entering pf_next_buf
Entering do_pf_request
Leaving do_pf_request at 854
Leaving pf_next_buf at 914
Entering next_request
Entering do_pf_request
Leaving do_pf_request at 860
Entering do_pf_request
Entering do_pf_read
Leaving do_pf_read at 937
Leaving do_pf_request at 888
Leaving next_request at 929
Leaving do_pf_read_drq at 987
Entering do_pf_read_start
Entering pf_start
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Leaving pf_start at 838
Leaving do_pf_read_start at 960
Entering do_pf_read_drq
Entering pf_wait
Leaving pf_wait at 431
Entering pf_next_buf
Leaving pf_next_buf at 902
Entering pf_wait
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
Leaving pf_wait at 428
Entering pf_next_buf
Entering do_pf_request
Leaving do_pf_request at 854
Leaving pf_next_buf at 914
Entering next_request
Entering do_pf_request
Leaving do_pf_request at 860
Entering do_pf_request
Entering do_pf_read
Leaving do_pf_read at 937
Leaving do_pf_request at 888
Leaving next_request at 929
Leaving do_pf_read_drq at 987
Entering do_pf_read_start
Entering pf_start
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Leaving pf_start at 838
Leaving do_pf_read_start at 960
Entering do_pf_read_drq
Entering pf_wait
Leaving pf_wait at 431
Entering pf_next_buf
Leaving pf_next_buf at 902
Entering pf_wait
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
Leaving pf_wait at 428
Entering pf_next_buf
Entering do_pf_request
Leaving do_pf_request at 854
Leaving pf_next_buf at 914
Entering next_request
Entering do_pf_request
Leaving do_pf_request at 860
Entering do_pf_request
Entering do_pf_read
Leaving do_pf_read at 937
Leaving do_pf_request at 888
Leaving next_request at 929
Leaving do_pf_read_drq at 987
Entering do_pf_read_start
Entering pf_start
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Leaving pf_start at 838
Leaving do_pf_read_start at 960
Entering do_pf_read_drq
Entering pf_wait
Leaving pf_wait at 431
Entering pf_next_buf
Leaving pf_next_buf at 902
Entering pf_wait
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
Leaving pf_wait at 428
Entering pf_next_buf
Leaving pf_next_buf at 914
Entering next_request
Entering do_pf_request
Leaving do_pf_request at 860
Leaving next_request at 929
Leaving do_pf_read_drq at 987
EXT3-fs error (device hda6): ext3_free_inode: bit already cleared for inode 663873
Aborting journal on device hda6.
EXT3-fs error (device hda6) in start_transaction: Readonly filesystem
Aborting journal on device hda6.
EXT3-fs error (device hda6) in ext3_delete_inode: IO failure
Entering pf_release
Entering pf_lock
Entering pf_atapi
Entering pf_command
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_command at 468
Entering pf_completion
Entering pf_wait
Leaving pf_wait at 431
Entering pf_wait
Leaving pf_wait at 431
Leaving pf_completion at 491
Leaving pf_atapi at 528
Leaving pf_lock at 541
Leaving pf_release at 382
ext3_abort called.
EXT3-fs error (device hda6): ext3_journal_start_sb: Detected aborted journal
Remounting filesystem read-only
Entering pf_exit
Leaving pf_exit at 1126
Comment 5 Andrew Morton 2005-07-29 00:26:35 UTC
I assume this is still happening in 2.6.13-rc4?

Can you please confirm that it always hits that bug in blockdev.h?
Comment 6 Jens Axboe 2005-07-29 00:50:01 UTC
Created attachment 5407 [details]
Clear pf_req when ended

It must be double completions of the pf_req. Does this work for you?
Comment 7 Jens Axboe 2005-07-29 00:51:53 UTC
Created attachment 5408 [details]
Version that compiles

Try this one instead, typo in the other patch.
Comment 8 Jens Axboe 2005-07-29 00:53:26 UTC
Created attachment 5409 [details]
Yet another typo fix

Irk, sorry about that, need more coffee. This one compiles and gets the
uptodate flag correct.
Comment 9 Ondrej Zary 2005-07-30 10:30:31 UTC
Problem is the same in 2.6.13-rc4?
It does not hit the bug always but very often.

With Jens patch applied to 2.6.13-rc4, it does not oops anymore. I was even able
to mount a floppy disk and copy a couple of bytes. But it was terribly slow,
showing these errors sometimes:
pf0: read block completion: alt=0x50 stat=0x50 err=0x100 loop=160001 phase=3
After copying about 50KB (which took maybe 15 minutes, the drive was
recalibrating or not doing anything most of the time), I rebooted the system
using RESET button (even after breaking the cp process, the driver was trying to
read some more data). Also during data transfer, the system is completely
unresponsive (even matroxfb cursor does not blink) for some periods of time.
Comment 10 Andrew Morton 2005-09-14 22:58:24 UTC
So no more movement on this?

Jens, do you think it's worth merging that patch?
Comment 11 Jens Axboe 2005-09-15 07:03:59 UTC
Definitely, even if it turns out not to be perfect it's much better than what is
already there.
Comment 12 Andrew Morton 2005-09-15 12:12:37 UTC
Could you send it over sometime, please?
Comment 13 Adrian Bunk 2005-12-29 06:54:56 UTC
This patch is included in 2.6.14.