Linux-kernel mailing list archive 1998-31,: Re: problem with a new block device

# Re: problem with a new block device

Philip Gladstone (philip@raptor.com)
Tue, 04 Aug 1998 14:33:54 -0400

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Albert D. Cahalan: "Re: [PATCH] [SECURITY] suid procs exec'd with bad 0,1,2 fds"
- Previous message: David Wragg: "Re: FB and MTRR"
- Maybe in reply to: Prescott, Richard: "problem with a new block device"

Hi,

This question comes up with a fair degree of regularity. My
advice to you would be to take a look at the PCMCIA code -- especially
the code for the FTL (flash translation layer). It turns out that with
a small amount of code (< 1000 lines) you can build a driver that
hooks onto the bottom of the ftl_cs and memory_cs modules. The ftl_cs
module exports a conventional block device, while memory_cs export
a character device. ftl_format can then be used to build the underlying
data structure for the ftl to use. [The Flash Translation Layer stuff
is really cool and gives you a 512 byte sector device when the
underlying
device can only be erased in large chunks (but can be written in small
chunks) It also takes care of balancing writes to the individual pages.]

Philip

Prescott, Richard wrote:
>
> Hi everybody !
>
> I'm trying to write a block device driver to emulate harddisk on a
> flash memory chip. It's an Intel flash memory on a Teknor motherboard.
>
> We can write on this chip only by 64kB block.
> Write acces take long time.
> In the life of a chip the number of write acces per block is limited.
> (something like one or ten millions acces)
>
> It's why i want to have a full 64kB buffer or a sync before beginning
> to write on the chip.
>
> Is it possible to specify to kernel to send only 64kB buffer in
> CURRENT->buffer ?
>
> Did anybody have a better idea ?
>
> Thanks a lot
>
> Richard Prescott
> Reply address: rip@step.polymtl.ca
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

    --
    Philip Gladstone                           +1 781 530 2461
    Raptor Systems / Axent Technologies
    Waltham, MA         		    http://www.raptor.com/

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

- Next message: Albert D. Cahalan: "Re: [PATCH] [SECURITY] suid procs exec'd with bad 0,1,2 fds"
- Previous message: David Wragg: "Re: FB and MTRR"
- Maybe in reply to: Prescott, Richard: "problem with a new block device"