Linux-kernel mailing list archive 1998-10,: Re: s_last_mounted in EXT2

# Re: s_last_mounted in EXT2

Theodore Y. Ts'o (tytso@MIT.EDU)
Wed, 11 Mar 1998 01:19:36 -0500

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: kwrohrer@enteract.com: "Re: Avoiding SMP"
- Previous message: G. Sumner Hayes: "Re: pre-2.1.90.."
- In reply to: Jakub Jelinek: "Re: s_last_mounted in EXT2"

From: Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
Date: Tue, 10 Mar 1998 12:43:34 +0100 (MET)

> It's probably best to do it at mount time, actually. We have the
> information then, and we have to write out the superblock anyway to mark
> it as unclean (so that it's properly marked as unclean if we crash
> without unmounting it).

You don't. d_path on sb->s_root at ext2_setup_super gives you always /.
You need either to wait till d_mount is done (and thus need to add
note_last_mounted) or pass the directory name to read_super.
I don't know which solution is better, I'd prefer note_last_mounted, but
would like to know which way to go.

I see. Yes, it does sound like doing it at unmount time is the easist.
It's nicer to do it at mount time, so that the field gets filled in even
when the system gets shutdown uncleanly, but filesystems usually get
mounted in the same place, so doing it at unmount time is probably
sufficient.

- Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

- Next message: kwrohrer@enteract.com: "Re: Avoiding SMP"
- Previous message: G. Sumner Hayes: "Re: pre-2.1.90.."
- In reply to: Jakub Jelinek: "Re: s_last_mounted in EXT2"