Skip to contentSkip to conversation

Losing inodes in DOC2000 w/ext2 fs?

DISCUSSION [email protected] 2 participants 2 messages Apr 14, 2004 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi all,

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.

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.

Will using JFFS2 solve this problem?

Many thanks,
--
Joe Robertson
[email protected]

#1 lore raw
Quoted 5 lines · On Wed, 2004-04-14 at 17:12 +0000, [email protected] 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?

Quoted 3 lines

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.

Quoted 1 line

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.

Signature · 1 line
dwmw2