Problem with deleted files

David Woodhouse dwmw2 at infradead.org
Fri Jan 26 08:53:49 EST 2001


Simon.Munton at m4data.co.uk said:
>  This could be fixed by always setting a node's deleted flag if the
> corresponding file's deleted flag is set, when it is written in
> jffs_write_node() and jffs_rewrite_data(). Can anyone see any problems
> with this?

Er... I thought we already did this. Yes, that's what I'd recommend. Once 
you're sure it's happy, can you commit the same change to the 
linux-2_4-branch too, please?

Simon.Munton at m4data.co.uk said:
> Should the filesystem fail to mount if it finds a node with no parent?
> Would it be better to just throw away such nodes, or perhaps create a
> virtual lost+found directory and put them there? 

I'd just let it mark them as deleted. JFFS2 will do that anyway - I'm not
going to bother with marking inodes as deleted. They'll just fade away when
nlink (calculated dynamically from the dirents) gets to zero.

The whole thing gets _so_ much more interesting when you no longer GC in 
strict order, and you can GC the 'deletion' nodes before you actually GC 
the nodes they're deleting... 

--
dwmw2




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



More information about the linux-mtd mailing list