From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Tue, 26 Apr 2005 06:34:29 +0000 Subject: Re: udev and raw support Message-Id: <20050426063428.GA5372@kroah.com> List-Id: References: <426CC269.5090400@ipom.com> In-Reply-To: <426CC269.5090400@ipom.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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_id396&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