More comments

Alexander Larsson alex at cendio.se
Tue Mar 28 06:30:20 EST 2000


On Tue, 28 Mar 2000, David Woodhouse wrote:
> alex at cendio.se said:
> > On Mon, 13 Mar 2000, David Woodhouse wrote:
> > > This has to be done somewhere. Where's best - in _every_ device driver
> > > or in only those front ends which attempt non-block-aligned access?
> 
> > I don't know. You seem to think that it's better to have it in the
> > front-ends, and I can accept that. I think the "_every_ driver" part
> > is a bit of an overstatement though, as I would think many drivers are
> > for fully memory-mapped flashes where this wouldn't be necessary
> > (where, in fact, looping in the frontend is unnecessary overhead).
> >  
> 
> OK. How about this:
> 
> You don't have to check the return from the mtd->write() function, it must 
> always write the complete buffer or return failure.
> 
> _BUT_ you may never make a write request which crosses a block boundary.
> 
> So you still have to possibly issue more than one write request in the jffs 
> code, but at least you can know beforehand and code accordingly, rather than 
> having a naïve loop.
> 
>  (s/write/read/ throughout also applies, obviously.)
 
Yes, this seems like a very good compromise. The jffs case is a bit
excpetional in this case.
 
> I'm putting together some documentation. 
> 
> 	www.linux-mtd.infradead.org/tech/API.html
> 					/mtd_info.html
> 					/core.html
> 					/erase.html
> 
> This will contain some changes to what's currently implemented - most notably 
> the notifier stuff will no longer have the horrible race conditions that it 
> currently does.

 I'll read it later tonigh. Review meetings all day...

/ Alex




To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list