Flash memory like geom class.

Takanori Watanabe takawata at init-main.com
Wed Jun 6 12:24:34 UTC 2007


Hi, I wrote flash memory like geom class backed
by kernel memory.

It emulates 4MB capacity, 512bytes block size and 16KB erase size flash memory.
The device is initialized with 0xff.
When you write a sector to the device, the content will be gets and operation 
with current sector content and the data provided.

When BIO_DELETE operation is issued, the times is counted per region
and fill the erase region with 0xff.

http://www.init-main.com/geom_pflash.tar.gz
Current issues I have is as follows.

1.How can I issue BIO_DELETE from userland?
I convice BIO_DELETE is used to perform erase operation to flash,
but I could not find a way to issue BIO_DELETE from userland.
Or BIO_DELETE is not suitable request for it?

2.How can I export statistic information?
I record the count of erase operation, but there is no way to
export the information for now, other than poking with 
debugger. How shall I do with it?

3.Do you think it something useful?
I think it can be used to develop flash file system.
How do think about this?




More information about the freebsd-geom mailing list