Summary: | mounting cdevs as regular vnodes | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Yakov Galka <ybungalobill> | ||||
Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | New --- | ||||||
Severity: | Affects Only Me | CC: | ybungalobill | ||||
Priority: | --- | ||||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Created attachment 239079 [details] prototype implementation FreeBSD does not implement filesystem caching for i/o done on cdevs. This makes i/o slow when done on raw devices, and renders impossible to mmap a cdev (which is supported by some other OSes). I'm attaching my implementation of a 'rawfs' filesystem: mount -t rawfs /dev/xxx /mnt then i/o on /mnt will be fully buffered, while giving a read-only view of the raw data on the device. This can be seen as an inverse of `mdconfig`. If there's an interest in including this functionality in the base system, please review the attached code. As it's evident, I had no prior experience working with FreeBSD kernel code, so any comments are welcome.