raw device property

Artem Kachitchkine Artem.Kachitchkin at Sun.COM
Thu Mar 30 12:27:10 PST 2006


> Well... As far as I know, any block device on Linux can be opened as a
> raw device with the O_DIRECT flag to the open(2) system call. This could
> be exposed through a block.o_direct_raw (better naming suggestions
> welcome) attribute that would simply be set for all block devices on
> Linux (and any other OS with the same behaviour.  The existence of a
> raw_device attribute would obviously mean that raw access should be
> obtained throught the file in that attribute, while the absence of a
> raw_device attribute along with the presence of the block.o_direct_raw
> attribute would signify that raw access can be obtained through the
> regular device file with the O_DIRECT flag set.

IMO o_direct_raw doesn't add much to the abstraction, 'cause you'll have 
to do conditional compilation of your client application anyway.

-Artem.





More information about the hal mailing list