Re: ext2fs: inode with zero dtime

Stephen C. Tweedie (sct@redhat.com)
Tue, 1 Sep 1998 15:03:29 +0100


Hi,

On Tue, 1 Sep 1998 15:52:30 +0100 (BST), alan@lxorguk.ukuu.org.uk (Alan
Cox) said:

>> For case 2, would it be reasonable to close the open files before the
>> remount, and allow them to be actually deleted before the remount
>> completes? Perhaps they could be deleted on disk, but left undeleted
>> as far as the in memory copy is concerned--we're about to reboot
>> anyway, right?

> No. Don't believe the entire world works the way you happen to
> think. I for example regularly remount almost everything read-only
> before trying the latest "hey this crashes Linux 2.0.36pre-blah"
> reports

Yes, we cannot mark the files deleted on disk. What we _can_ do is to
mark all orphaned files as pending delete, keep them on a list, and
remove them from the list when they are finally closed (and properly
deleted).

That allows us to remount readonly then rw again quite safely. On
mounting readwrite, or on remounting the fs after a reboot, any orphaned
files can be found and deleted as part of the mount system call. This
is slated for 2.3 as part of the journaling work, but the special
treatment of orphaned files is something which could easily be made to
work even on non-journaled filesystems.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html