Storage driver design question

Indranil Bhattacharya indranil at virident.com
Tue May 18 08:49:35 UTC 2010


Hi,

 

I am writing the driver for a storage device on the latest freebsd
kernel. The device will sit on the PCIe bus. 

As a starting point; I have written a very simple memory-disk driver
that implements a geom-class. It implements the init() method by writing
& reading from memory (that it has earlier allocated) as part of
BIO_WRITE & BIO_READ respectively. I am able to create a filesystem on
this driver & read/write files on this filesystem.

I am also writing a PCI driver for the actual hardware device. Once that
is done, I will modify the memory-disk driver to talk to this PCI driver
instead of just operating from memory.

Does this look like a correct design ?  Or should the entry point to my
driver sit somewhere else in the I/O stack ?

 

Thanks in advance,

Indranil 

 

 



More information about the freebsd-drivers mailing list