tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Devices.



woods%planix.ca@localhost ("Greg A. Woods") writes:

>My understanding w.r.t. the rationale FreeBSD used in deciding to remove
>the block devices was that FreeBSD never really buffered/cached by
>device in the first place.  Also, according to PHK in his 2002 BSDCan
>paper about FreeBSD's /dev, "In FreeBSD block devices were not even
>implemented in a fashion which would be of any use, since any write
>errors would never be reported to the writing process."[*]
>[*] https://www.usenix.org/legacy/events/bsdcon02/full_papers/kamp/kamp_html/index.html

>If I'm not mistaken that's all different in NetBSD though (except maybe
>for the error handling issue), or am I mistaken???


The same arguments are pretty much valid for NetBSD too. But to a large
degree that's more an argument to make such things work.

If you remove block devices, you still want to distinguish between
buffered access (can be done in arbitrary sizes, read-modify-write
as necessary) and raw access (direct hardware I/O with its limitations).

You can do that with e.g. flags to open(). Or you can require that
each program handles this privately. Neither will be compatible
with the current behaviour.



Home | Main Index | Thread Index | Old Index