Losing inodes in DOC2000 w/ext2 fs?

David Woodhouse dwmw2 at infradead.org
Wed Apr 14 13:50:22 EDT 2004


On Wed, 2004-04-14 at 17:12 +0000, jmrobert5 at mchsi.com wrote:
> I have been having an issue with a ext2 fs on a DOC2000.  If I overwrite a file
> being marked as used by a process (such as a lib), the file is cached and then
> later flushed at a reboot.  But then there are many unused inodes hanging
> around.  The result is my flash upgrades leave many inodes marked as being used,
> using more space.

This is a symptom of improper shutdowns with a non-journalling file
system. The space taken by these inodes should be reclaimed when you
fsck, surely?

> Is this another effect that is talked about in the FAQ?  Or the real question,
> is this a file system issue, or an MTD doc driver issue?  The FAQ leads me to
> believe its a ext2 issue.

Using ext3 would solve it, at a high cost. Because ext3 does journalling
at the block device layer, it means all metadata changes are written
_twice_ to the flash.

> Will using JFFS2 solve this problem?

Yes. We need to update the new DiskOnChip driver to handle bad blocks
(and preferably hardware ECC) first, but I've had this working.

-- 
dwmw2




More information about the linux-mtd mailing list