Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jun 2007 14:34:55 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Takanori Watanabe <takawata@init-main.com>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Flash memory like geom class.
Message-ID:  <20070606123455.GE1121@garage.freebsd.pl>
In-Reply-To: <200706061155.l56BtHSY019405@sana.init-main.com>
References:  <200706061155.l56BtHSY019405@sana.init-main.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--AjmyJqqohANyBN/e
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jun 06, 2007 at 08:55:17PM +0900, Takanori Watanabe wrote:
> Hi, I wrote flash memory like geom class backed
> by kernel memory.
>=20
> It emulates 4MB capacity, 512bytes block size and 16KB erase size flash m=
emory.
> The device is initialized with 0xff.
> When you write a sector to the device, the content will be gets and opera=
tion=20
> with current sector content and the data provided.
>=20
> When BIO_DELETE operation is issued, the times is counted per region
> and fill the erase region with 0xff.
>=20
> http://www.init-main.com/geom_pflash.tar.gz
> Current issues I have is as follows.
>=20
> 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?

I recently exteneded libgeom to support g_delete() function, which does
what you want. You may also use DIOCGDELETE directly (also added
recently).

> 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=20
> debugger. How shall I do with it?

I'd guess sysctl or if you want them to be per-provider you should geom
geom_ctl. Check out g_nop.c and how it exports various statistics in
g_nop_dumpconf() function.

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

I haven't looked at the code yet, not thought about this, just wanted to
provide some info, so I can't comment on its usefulness yet.

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--AjmyJqqohANyBN/e
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFGZqnvForvXbEpPzQRAlUzAKCPgX51QzgB4JVFFonSvli6AChMFgCeLu9c
meAzjxOXUWhRxw/2zvB5HxI=
=iZsS
-----END PGP SIGNATURE-----

--AjmyJqqohANyBN/e--



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