raw device property

David Zeuthen david at fubar.dk
Thu Mar 30 10:55:58 PST 2006


Hi,

Sorry for the lag,

On Tue, 2006-03-28 at 12:25 -0800, Artem Kachitchkine wrote:
> In Solaris and some other unixes for each block device there is a 
> corresponding character device, which we call a raw device, e.g:
> 
> $ ls -lL /dev/{dsk,rdsk}/c0d0p0
> brw-r-----   1 root     sys      102, 16 Mar 28 12:15 /dev/dsk/c0d0p0
> crw-r-----   1 root     sys      102, 16 Mar 28 12:15 /dev/rdsk/c0d0p0
> 
> Data from/to a raw device doesn't go through buffer cache. Also, many 
> ioctls, such as getting CDROM TOC and CD-DA data, are only allowed on a 
> raw device.
> 
> Initially I thought the apps would just convert /dev/dsk/* to 
> /dev/rdsk/*, but besides being pain in the butt, it's also not generic 
> enough. What if block->raw name conversion is more difficult or expensive?
> 
> I propose to add an optional property "block.raw_device" to point to the 
> raw device corresponding to the "block.device" block device. Apps like 
> nautilus CD burner then check if "block.raw_device" exists, and if not, 
> fall back to "block.device".
> 
> If there are no protests and the property name is adequate, I will upate 
> the spec.

Reading the thread, I think it should be called block.solaris_raw_device
- if Linux or other OS'es in the future adopt similar semantics we can
introduce block.raw_device and deprecate block.solaris_raw_device, yes?

Cheers,
David




More information about the hal mailing list