Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 May 2010 01:49:26 -0700
From:      "Indranil Bhattacharya" <indranil@virident.com>
To:        <freebsd-drivers@freebsd.org>
Subject:   Storage driver design question
Message-ID:  <28631E6913C8074E95A698E8AC93D09101B5C093@caexch1.virident.info>

next in thread | raw e-mail | index | archive | help
Hi,

=20

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

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 ?

=20

Thanks in advance,

Indranil=20

=20

=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?28631E6913C8074E95A698E8AC93D09101B5C093>