[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ramblings on NAND flash support.



Hi,

> 
> Secondly, you need to deal with write errors when flushing the write cache.
> You haven't lost any data - either your node is entirely in the write cache
> and can just be written out elsewhere, or only the end of it is in the write
> cache and you know that the beginning of it is on the flash OK - in which 
> case you can read it back and write the whole thing out elsewhere.
> 

You also have to mark the page as bad. I guess it's the easiest to
create a new inode type containing the bad block list ?

> Oh, and you'll need to implement fsync() I suppose. That won't be hard
> either - you can just check whether any nodes belonging to the inode
> being synced are currently in the write cache. When you need to flush the
> write cache to honour fsync() I think it's probably best just to trigger
> garbage collection to _fill_ the write cache and make it get flushed
> naturally, rather than padding the block. 
> 
> You'll need to move the CLEANMARKER node into the 'spare' area of your 
> flash chip, which is trivial to do.
> 
> Altogether, it doesn't seem quite as complicated as once I thought it 
> was.... is that because I've missed out something obvious?
> 

Peter.

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com