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

Re: Read-only /usr



On Wed, Nov 07, 2001 at 11:22:34AM +0100, Martin Waitz wrote:
> isn't this a filesystem bug?
> it could delete the inode on-disk, but still keep it in-memory
> as long as it's being used by some process

it can't. It has to mark the blocks and inode marked as used on disk,
otherwise they would be overwritten. As long as those blocks are marked as
used, they have to be marked as unused after the last handle is closed.

> i think the kernel-people are aware of this (i read about this problem
> some time ago...) but don't know if anyone is working on a fix

This would mean you have to store all indirection blocks and the inode of
the file in memory and it means to clone the free block bitfield in memory
to make sure the copy on disk is the one which marks the blocks free and the
actual used copy marks them as used. The meta data is simply too much to
keep it in memory.

Closing a delted file means freeing blocks and this means writing to disk.
So you cant remount ro as long as a file which is deleted is open. Same is
true as long as you have a file opened for read.

Greetings
Bernd



Reply to: