From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev and raw support
Date: Tue, 26 Apr 2005 06:34:29 +0000 [thread overview]
Message-ID: <20050426063428.GA5372@kroah.com> (raw)
In-Reply-To: <426CC269.5090400@ipom.com>
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
next prev parent reply other threads:[~2005-04-26 6:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2005-04-26 6:38 ` Phil Dibowitz
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=20050426063428.GA5372@kroah.com \
--to=greg@kroah.com \
--cc=linux-hotplug@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 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).