* udev and raw support
@ 2005-04-25 10:11 Phil Dibowitz
2005-04-25 20:14 ` Greg KH
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: Phil Dibowitz @ 2005-04-25 10:11 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 609 bytes --]
Hey folks,
I don't see a "linux-hotplug-users" list anywhere, so I'm posting to
linux-hotplug-devel and hoping this is an acceptable question.
Does udev have support for raw devices? After a handful of googling, I
don't see any clear answers to that question.
Thanks...
--
Phil Dibowitz phil@ipom.com
Freeware and Technical Pages Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev and raw support
2005-04-25 10:11 udev and raw support Phil Dibowitz
@ 2005-04-25 20:14 ` Greg KH
2005-04-25 20:19 ` Phil Dibowitz
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2005-04-25 20:14 UTC (permalink / raw)
To: linux-hotplug
On Mon, Apr 25, 2005 at 03:11:53AM -0700, Phil Dibowitz wrote:
> Hey folks,
>
> I don't see a "linux-hotplug-users" list anywhere, so I'm posting to
> linux-hotplug-devel and hoping this is an acceptable question.
>
> Does udev have support for raw devices? After a handful of googling, I
> don't see any clear answers to that question.
Yes. Should work just fine. What problems are you having?
thanks,
greg k-h
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev and raw support
2005-04-25 10:11 udev and raw support Phil Dibowitz
2005-04-25 20:14 ` Greg KH
@ 2005-04-25 20:19 ` Phil Dibowitz
2005-04-25 20:38 ` Greg KH
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Phil Dibowitz @ 2005-04-25 20:19 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]
On Mon, Apr 25, 2005 at 01:14:48PM -0700, Greg KH wrote:
> On Mon, Apr 25, 2005 at 03:11:53AM -0700, Phil Dibowitz wrote:
> > Hey folks,
> >
> > I don't see a "linux-hotplug-users" list anywhere, so I'm posting to
> > linux-hotplug-devel and hoping this is an acceptable question.
> >
> > Does udev have support for raw devices? After a handful of googling, I
> > don't see any clear answers to that question.
>
> Yes. Should work just fine. What problems are you having?
I have found little information on raw devices in linux, so I may be
missing something else basic here...
But the rawctl device isn't there:
[phil@rider ~]$ sudo raw /dev/raw/raw1 /dev/hdc
Cannot open master raw device '/dev/rawctl' (No such file or directory)
[phil@rider ~]$
--
Phil Dibowitz phil@ipom.com
Freeware and Technical Pages Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev and raw support
2005-04-25 10:11 udev and raw support Phil Dibowitz
2005-04-25 20:14 ` Greg KH
2005-04-25 20:19 ` Phil Dibowitz
@ 2005-04-25 20:38 ` Greg KH
2005-04-26 4:42 ` Phil Dibowitz
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2005-04-25 20:38 UTC (permalink / raw)
To: linux-hotplug
On Mon, Apr 25, 2005 at 01:19:07PM -0700, Phil Dibowitz wrote:
> On Mon, Apr 25, 2005 at 01:14:48PM -0700, Greg KH wrote:
> > On Mon, Apr 25, 2005 at 03:11:53AM -0700, Phil Dibowitz wrote:
> > > Hey folks,
> > >
> > > I don't see a "linux-hotplug-users" list anywhere, so I'm posting to
> > > linux-hotplug-devel and hoping this is an acceptable question.
> > >
> > > Does udev have support for raw devices? After a handful of googling, I
> > > don't see any clear answers to that question.
> >
> > Yes. Should work just fine. What problems are you having?
>
> I have found little information on raw devices in linux, so I may be
> missing something else basic here...
>
> But the rawctl device isn't there:
>
> [phil@rider ~]$ sudo raw /dev/raw/raw1 /dev/hdc
> Cannot open master raw device '/dev/rawctl' (No such file or directory)
> [phil@rider ~]$
Is the raw module loaded?
thanks,
greg k-h
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev and raw support
2005-04-25 10:11 udev and raw support Phil Dibowitz
` (2 preceding siblings ...)
2005-04-25 20:38 ` Greg KH
@ 2005-04-26 4:42 ` Phil Dibowitz
2005-04-26 5:26 ` Greg KH
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Phil Dibowitz @ 2005-04-26 4:42 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
Greg KH wrote:
>>But the rawctl device isn't there:
>>
>>[phil@rider ~]$ sudo raw /dev/raw/raw1 /dev/hdc
>>Cannot open master raw device '/dev/rawctl' (No such file or directory)
>>[phil@rider ~]$
>
> Is the raw module loaded?
Doh, didn't know there was one (as I said, new to raw). Silly me. OK,
well, now it's loaded and I get:
[root@rider dev]# raw /dev/raw/raw1 /dev/hdc
Cannot locate raw device '/dev/raw/raw1' (No such file or directory)
--
Phil Dibowitz phil@ipom.com
Freeware and Technical Pages Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev and raw support
2005-04-25 10:11 udev and raw support Phil Dibowitz
` (3 preceding siblings ...)
2005-04-26 4:42 ` Phil Dibowitz
@ 2005-04-26 5:26 ` Greg KH
2005-04-26 5:39 ` Phil Dibowitz
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2005-04-26 5:26 UTC (permalink / raw)
To: linux-hotplug
On Mon, Apr 25, 2005 at 09:42:23PM -0700, Phil Dibowitz wrote:
> Greg KH wrote:
> >>But the rawctl device isn't there:
> >>
> >>[phil@rider ~]$ sudo raw /dev/raw/raw1 /dev/hdc
> >>Cannot open master raw device '/dev/rawctl' (No such file or directory)
> >>[phil@rider ~]$
> >
> > Is the raw module loaded?
>
> Doh, didn't know there was one (as I said, new to raw). Silly me. OK,
> well, now it's loaded and I get:
>
> [root@rider dev]# raw /dev/raw/raw1 /dev/hdc
> Cannot locate raw device '/dev/raw/raw1' (No such file or directory)
What distro are you using? In order to have udev and raw working
together, you need a new version of the raw userspace program (sorry,
forgot about this until right now.) I know SuSE ships it in their
distro, don't know about everyone else.
Also, why use raw at all? It's depreciated, nasty code, which no one
likes at all, and has no real-world use. It is also going to be ripped
out of the kernel entirely one of these days. The only people who like
it are people who want to create useless benchmarks...
thanks,
greg k-h
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev and raw support
2005-04-25 10:11 udev and raw support Phil Dibowitz
` (4 preceding siblings ...)
2005-04-26 5:26 ` Greg KH
@ 2005-04-26 5:39 ` Phil Dibowitz
2005-04-26 5:54 ` Greg KH
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Phil Dibowitz @ 2005-04-26 5:39 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]
Greg KH wrote:
>
> What distro are you using? In order to have udev and raw working
> together, you need a new version of the raw userspace program (sorry,
> forgot about this until right now.) I know SuSE ships it in their
> distro, don't know about everyone else.
Debian unstable.
/sbin/raw seems to be part of util-linux which is at version 2.12p-4 in
debian unstable - i.e. 2.12p with 4 local debian revisions which may or
may not include code from later util-linux releases.
> Also, why use raw at all? It's depreciated, nasty code, which no one
> likes at all, and has no real-world use. It is also going to be ripped
> out of the kernel entirely one of these days. The only people who like
> it are people who want to create useless benchmarks...
I've never used it in linux, only in Solaris... but I'm told that it
will provide better DVD Video read performance. Many of the DVD players
out there provide support for raw devices, and in fact recommend using them.
Since even on my high-end system I don't get the DVD playback that I get
on my living room DVD player, I decided to give it a shot.
Why is it depricated? What's wrong with using raw devices?
--
Phil Dibowitz phil@ipom.com
Freeware and Technical Pages Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev and raw support
2005-04-25 10:11 udev and raw support Phil Dibowitz
` (5 preceding siblings ...)
2005-04-26 5:39 ` Phil Dibowitz
@ 2005-04-26 5:54 ` Greg KH
2005-04-26 6:14 ` Phil Dibowitz
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2005-04-26 5:54 UTC (permalink / raw)
To: linux-hotplug
On Mon, Apr 25, 2005 at 10:39:43PM -0700, Phil Dibowitz wrote:
> Greg KH wrote:
> >
> > What distro are you using? In order to have udev and raw working
> > together, you need a new version of the raw userspace program (sorry,
> > forgot about this until right now.) I know SuSE ships it in their
> > distro, don't know about everyone else.
>
> Debian unstable.
>
> /sbin/raw seems to be part of util-linux which is at version 2.12p-4 in
> debian unstable - i.e. 2.12p with 4 local debian revisions which may or
> may not include code from later util-linux releases.
I really don't know if they got that patch or not, sorry.
> > Also, why use raw at all? It's depreciated, nasty code, which no one
> > likes at all, and has no real-world use. It is also going to be ripped
> > out of the kernel entirely one of these days. The only people who like
> > it are people who want to create useless benchmarks...
>
> I've never used it in linux, only in Solaris... but I'm told that it
> will provide better DVD Video read performance. Many of the DVD players
> out there provide support for raw devices, and in fact recommend using them.
For Linux? Just use O_DIRECT and it should work the same.
> Since even on my high-end system I don't get the DVD playback that I get
> on my living room DVD player, I decided to give it a shot.
My crappy, slow, no-memory, 2+ year old laptop gives great dvd playback,
perhaps you have some other issues with your system (sorry, I'm not
going to be able to help out here, as I don't know anything about video
playback other than it "works for me")
> Why is it depricated? What's wrong with using raw devices?
Because you should use O_DIRECT to access block devices directly, which
properly uses the kernel io subsystems. raw goes around all of that,
and thinks it is smarter than the kernel. In the end, it is wrong, and
can be slower.
Anyway, you can get around this by creating the device node by hand if
you really want. I suggest you file a debian bug to get them to fix the
raw program to work properly with udev.
Good luck,
greg k-h
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev and raw support
2005-04-25 10:11 udev and raw support Phil Dibowitz
` (6 preceding siblings ...)
2005-04-26 5:54 ` Greg KH
@ 2005-04-26 6:14 ` Phil Dibowitz
2005-04-26 6:34 ` Greg KH
2005-04-26 6:38 ` Phil Dibowitz
9 siblings, 0 replies; 11+ messages in thread
From: Phil Dibowitz @ 2005-04-26 6:14 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1760 bytes --]
Greg KH wrote:
> I really don't know if they got that patch or not, sorry.
What version of util-linux has that patch, do you know?
Well http://www.kernel.org/pub/linux/utils/util-linux/ only goes up to
q, so I'm guess that's it. I'll file a bug report, thanks.
> Because you should use O_DIRECT to access block devices directly, which
> properly uses the kernel io subsystems. raw goes around all of that,
> and thinks it is smarter than the kernel. In the end, it is wrong, and
> can be slower.
Fair enough. Wouldn't it make sense to make a simple raw module that
simply was equivalent to opening the block device with O_DIRECT if for
no other reason than, erm, "backwards" compatiblity with other unices -
for ease of the writers of mplayer/xine/ogle/etc.?
> Anyway, you can get around this by creating the device node by hand if
> you really want. I suggest you file a debian bug to get them to fix the
> raw program to work properly with udev.
I would be interested to experiment, even though I'm sure you're
right... but I think I'm missing something... don't the major/minor
number need to be the same:
[phil@rider rc2.d]$ sudo mknod /dev/raw/raw1 c 22 0
[phil@rider rc2.d]$ sudo raw /dev/raw/raw1 /dev/hdc
Device '/dev/raw/raw1' is not a raw dev
[phil@rider rc2.d]$ ls -l /dev/raw/raw1 /dev/hdc
brw-rw---- 1 root cdrom 22, 0 Apr 25 21:36 /dev/hdc
crw-r--r-- 1 root root 22, 0 Apr 25 23:08 /dev/raw/raw1
--
Phil Dibowitz phil@ipom.com
Freeware and Technical Pages Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev and raw support
2005-04-25 10:11 udev and raw support Phil Dibowitz
` (7 preceding siblings ...)
2005-04-26 6:14 ` Phil Dibowitz
@ 2005-04-26 6:34 ` Greg KH
2005-04-26 6:38 ` Phil Dibowitz
9 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2005-04-26 6:34 UTC (permalink / raw)
To: linux-hotplug
On Mon, Apr 25, 2005 at 11:14:36PM -0700, Phil Dibowitz wrote:
> Greg KH wrote:
> > Because you should use O_DIRECT to access block devices directly, which
> > properly uses the kernel io subsystems. raw goes around all of that,
> > and thinks it is smarter than the kernel. In the end, it is wrong, and
> > can be slower.
>
> Fair enough. Wouldn't it make sense to make a simple raw module that
> simply was equivalent to opening the block device with O_DIRECT if for
> no other reason than, erm, "backwards" compatiblity with other unices -
> for ease of the writers of mplayer/xine/ogle/etc.?
No, raw creates a char device. O_DIRECT is a block device. Two totally
different interfaces.
And hey, just prod those "other unices" to offer O_DIRECT support if you
need that kind of compatibility :)
> > Anyway, you can get around this by creating the device node by hand if
> > you really want. I suggest you file a debian bug to get them to fix the
> > raw program to work properly with udev.
>
> I would be interested to experiment, even though I'm sure you're
> right... but I think I'm missing something... don't the major/minor
> number need to be the same:
>
> [phil@rider rc2.d]$ sudo mknod /dev/raw/raw1 c 22 0
I think raw1 should be 22 1, not 22 0. Isn't 22 0 rawctl? Oops, no
rawctl is 162 0, so shouldn't raw1 be 162 1?
Major 22 char device is reserved for a Digi serial card, which I don't
think you are trying to use :)
Yup, making the device node by hand here, on a gentoo box which does not
have an updated raw command worked just fine.
See Documentation/devices.txt for more info on what you should be using
for major/minor numbers here.
thanks,
greg k-h
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev and raw support
2005-04-25 10:11 udev and raw support Phil Dibowitz
` (8 preceding siblings ...)
2005-04-26 6:34 ` Greg KH
@ 2005-04-26 6:38 ` Phil Dibowitz
9 siblings, 0 replies; 11+ messages in thread
From: Phil Dibowitz @ 2005-04-26 6:38 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 851 bytes --]
Greg KH wrote:
> I think raw1 should be 22 1, not 22 0. Isn't 22 0 rawctl? Oops, no
> rawctl is 162 0, so shouldn't raw1 be 162 1?
>
> Major 22 char device is reserved for a Digi serial card, which I don't
> think you are trying to use :)
>
> Yup, making the device node by hand here, on a gentoo box which does not
> have an updated raw command worked just fine.
>
> See Documentation/devices.txt for more info on what you should be using
> for major/minor numbers here.
Ah. I see. Works now.
Thanks Greg...
--
Phil Dibowitz phil@ipom.com
Freeware and Technical Pages Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-04-26 6:38 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-25 10:11 udev and raw support Phil Dibowitz
2005-04-25 20:14 ` Greg KH
2005-04-25 20:19 ` Phil Dibowitz
2005-04-25 20:38 ` Greg KH
2005-04-26 4:42 ` Phil Dibowitz
2005-04-26 5:26 ` Greg KH
2005-04-26 5:39 ` Phil Dibowitz
2005-04-26 5:54 ` Greg KH
2005-04-26 6:14 ` Phil Dibowitz
2005-04-26 6:34 ` Greg KH
2005-04-26 6:38 ` Phil Dibowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).