ext4: add support for multiple mount protection
authorJohann Lombardi <johann@whamcloud.com>
Tue, 24 May 2011 22:31:25 +0000 (18:31 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 24 May 2011 22:31:25 +0000 (18:31 -0400)
commitc5e06d101aaf72f1f2192a661414459775e9bd74
tree96d05d41be2bfea6d51be915ce196f033a5d9bf3
parentd02a9391f79cab65cde74cd9e8ccd2290a565229
ext4: add support for multiple mount protection

Prevent an ext4 filesystem from being mounted multiple times.
A sequence number is stored on disk and is periodically updated (every 5
seconds by default) by a mounted filesystem.
At mount time, we now wait for s_mmp_update_interval seconds to make sure
that the MMP sequence does not change.
In case of failure, the nodename, bdevname and the time at which the MMP
block was last updated is displayed.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/Makefile
fs/ext4/ext4.h
fs/ext4/mmp.c [new file with mode: 0644]
fs/ext4/super.c