[PATCH]Add erase count tracking support in JFFS2

zhao forrest zhao_fusheng at hotmail.com
Wed Aug 24 08:45:23 EDT 2005


>
> > diff -auNrp ./mtd/include/linux/jffs2_fs_sb.h 
./mtd_new/include/linux/jffs2_fs_sb.h
> > --- ./mtd/include/linux/jffs2_fs_sb.h	2005-05-20 06:00:14.000000000 
+0800
> > +++ ./mtd_new/include/linux/jffs2_fs_sb.h	2005-08-18 13:28:36.000000000 
+0800
> > @@ -40,7 +40,9 @@ struct jffs2_sb_info {
> >  					   out-of-order writing of nodes. And GC. */
> >  	uint32_t cleanmarker_size;	/* Size of an _inline_ CLEANMARKER
> >  					 (i.e. zero for OOB CLEANMARKER */
> > -
> > +#ifdef CONFIG_JFFS2_FS_ERASE_COUNT_TRACKING
> > +	uint32_t erasecount_size;	/* size of an _inline_ erase-count node */
> > +#endif
> >  	uint32_t flash_size;
> >  	uint32_t used_size;
> >  	uint32_t dirty_size;
> > @@ -89,6 +91,10 @@ struct jffs2_sb_info {
> >  	wait_queue_head_t inocache_wq;
> >  	struct jffs2_inode_cache **inocache_list;
> >  	spinlock_t inocache_lock;
> > +
> > +#ifdef CONFIG_JFFS2_FS_ERASE_COUNT_TRACKING
> > +	uint32_t total_erase_count;	/* The summary erase count of all erase 
blocks on a Flash  */
> > +#endif
>
>This field is write-only?  What did you plan to do with it?
>

total_erase_count will be used in my next patch for "enhanced 
wear-leveling" patch.
I'll send out another to fix other points soon.

Thanks,
Forrest






More information about the linux-mtd mailing list