On Aug 15, 2008, at 9:40 AM, Alexander Klyuev wrote:
I have to develop IOKit filter driver that should
filter requests at IOBlockStorageDevice level.
I've examined Apple documentation and found nothing
on how to create such filter driver for working
at arbitrary device driver stack level.
The system is not very tolerant of components in the stack "filtering"
requests. Filesystems expect that the storage stack will write what
it is told to write, and more importantly that reads will return
whatever was written, and they don't expect devices to exhibit non-
disk-like failure modes.
Your options for filtering activity are fairly limited.
Does anyone know is there general possibility to create
such driver and squeeze it into device driver stack
at appropriate level?
The stack does not support runtime injection; you would want to write
a filter scheme driver to do this.
The usual question applies; what are you trying to achieve? Maybe
there is a better way than living at the block I/O level?