From: Jens Axboe <axboe@suse.de>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@digeo.com>
Subject: Re: 2.5.64-mm6: oops in elv_remove_request
Date: Fri, 14 Mar 2003 11:42:19 +0100 [thread overview]
Message-ID: <20030314104219.GA791@suse.de> (raw)
In-Reply-To: <1047633884.1147.3.camel@ixodes.goop.org>
On Fri, Mar 14 2003, Jeremy Fitzhardinge wrote:
> On Thu, 2003-03-13 at 11:02, Jens Axboe wrote:
> > Nope cdrecord is fine, but I think only open by device name works
> > currently. So you'd need to do
> >
> > # cdrecord -dev=/dev/hdX -inq
> >
> > to print inquiry data, for instance.
>
> I get this with some random cdrecord rpm:
>
> # cdrecord dev=/dev/hdc -inq
> Cdrecord 2.01a05 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?rg
> Schilling
> scsidev: '/dev/hdc'
> devname: '/dev/hdc'
> scsibus: -2 target: -2 lun: -2
> Warning: Open by 'devname' is unintentional and not supported.
> Linux sg driver version: 3.5.27
> Using libscg version 'schily-0.7'
> cdrecord: Operation not permitted. Cannot send SCSI cmd via ioctl
>
> strace shows this:
>
> open("/dev/hdc", O_RDWR|O_NONBLOCK) = 3
> fcntl64(3, F_GETFL) = 0x8802 (flags O_RDWR|O_NONBLOCK|O_LARGEFILE)
> fcntl64(3, F_SETFL, O_RDWR|O_LARGEFILE) = 0
> ioctl(3, 0x5382, 0xbfffc490) = 0
> ioctl(3, 0x5386, 0xbfffc48c) = 0
> ioctl(3, 0x2282, 0xbfffc494) = 0
> write(2, "Linux sg driver version: 3.5.27\n", 32) = 32
this matches the block/scsi_ioctl.c transport
> ioctl(3, 0x5382, 0xbfffc430) = 0
> ioctl(3, 0x5386, 0xbfffc42c) = 0
> ioctl(3, 0x2201, 0xbfffc344) = 0
> fstat64(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(22, 0), ...}) = 0
> write(1, "Using libscg version \'schily-0.7"..., 34) = 34
> ioctl(3, 0x2272, 0xbfffc674) = 0
> ioctl(3, 0x2272, 0xbfffc670) = 0
> ioctl(3, 0x2272, 0xbfffc644) = 0
> ioctl(3, 0x2272, 0xbfffc640) = 0
> brk(0x80a4000) = 0x80a4000
> gettimeofday({1047632019, 859019}, NULL) = 0
> write(3, "*\0\0\0$\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 42) = -1 EPERM (Operation not permitted)
it's trying to write a SCSI command to the device, assuming it's a
character scsi generic device. bad!
> ioctl(3, 0x2201, 0xbfff45f4) = 0
> gettimeofday({1047632019, 859188}, NULL) = 0
> write(2, "cdrecord: Operation not permitte"..., 66) = 66
> munmap(0x40013000, 4096) = 0
>
> With the version or cdrtools I compiled, I get an instant oops+lockup
> with the above command when running with anticipatory scheduler in
> 2.5.64-mm6 (hand written):
Bug in that io scheduler...
> I'll try it with deadline and see what happens... seems to work OK:
>
> # ./cdrecord dev=/dev/hdc -inq
> Cdrecord 2.01a05 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?rg Schilling
> scsidev: '/dev/hdc'
> devname: '/dev/hdc'
> scsibus: -2 target: -2 lun: -2
> Warning: Open by 'devname' is unintentional and not supported.
> Linux sg driver version: 3.5.27
> Using libscg version 'schily-0.7'
> Device type : Removable CD-ROM
> Version : 2
> Response Format: 2
> Capabilities :
> Vendor_info : 'PLEXTOR '
> Identifikation : 'CD-R PX-W4824A'
> Revision : '1.04'
> Device seems to be: Generic mmc CD-RW.
Looks much better. Somehow the 'random' rpm you had didn't do SG_IO,
odd.
> though I don't seem to be able to set up a default device in
> /etc/cdrecord.conf.
I have no idea how that works. What do you typicall do?
--
Jens Axboe
next prev parent reply other threads:[~2003-03-14 9:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-13 17:22 2.5.64-mm6: kernel BUG at kernel/timer.c:155! Jeremy Fitzhardinge
2003-03-13 17:45 ` Jeremy Fitzhardinge
2003-03-13 17:54 ` Jens Axboe
2003-03-13 18:04 ` Jeremy Fitzhardinge
2003-03-13 19:02 ` Jens Axboe
2003-03-14 9:24 ` 2.5.64-mm6: oops in elv_remove_request Jeremy Fitzhardinge
2003-03-14 10:42 ` Jens Axboe [this message]
2003-03-14 10:06 ` Jeremy Fitzhardinge
2003-03-14 10:31 ` Jeremy Fitzhardinge
2003-03-14 11:37 ` Jens Axboe
2003-03-14 17:59 ` Jeremy Fitzhardinge
2003-03-14 18:07 ` Jens Axboe
2003-03-14 22:19 ` Jeremy Fitzhardinge
2003-03-15 8:15 ` Jens Axboe
2003-03-16 2:54 ` Jeremy Fitzhardinge
2003-03-17 8:05 ` Jens Axboe
2003-03-17 16:56 ` Jeremy Fitzhardinge
2003-03-24 13:14 ` Jens Axboe
2003-03-14 20:33 ` Jens Axboe
2003-03-14 22:15 ` Jeremy Fitzhardinge
2003-03-15 8:15 ` Jens Axboe
2003-03-13 20:52 ` 2.5.64-mm6: kernel BUG at kernel/timer.c:155! Aravind
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030314104219.GA791@suse.de \
--to=axboe@suse.de \
--cc=akpm@digeo.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.