aboutsummaryrefslogtreecommitdiffstats
path: root/misc/util.h
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@whamcloud.com>2011-09-24 13:48:55 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-09-25 01:55:23 -0400
commit0f5eba7501f467f757792ee449d16c9259b994fd (patch)
tree017ff4ababf519440760ecb49bcc43a5cd618d15 /misc/util.h
parent6747ac86b9b4eac864af768a2fa09b8a22e363a5 (diff)
downloadandroid_external_e2fsprogs-0f5eba7501f467f757792ee449d16c9259b994fd.tar.gz
android_external_e2fsprogs-0f5eba7501f467f757792ee449d16c9259b994fd.tar.bz2
android_external_e2fsprogs-0f5eba7501f467f757792ee449d16c9259b994fd.zip
ext2fs: add multi-mount protection (INCOMPAT_MMP)
Multi-mount protection is feature that allows mke2fs, e2fsck, and others to detect if the filesystem is mounted on a remote node (on SAN disks) and avoid corrupting the filesystem. For e2fsprogs this means that it checks the MMP block to see if the filesystem is in use, and marks the filesystem busy while e2fsck is running on the system. This is useful on SAN disks that are shared between high-availability servers, or accessible by multiple nodes that aren't in HA pairs. MMP isn't intended to serve as a primary HA exclusion mechanism, but as a failsafe to protect against user, software, or hardware errors. There is no requirement that e2fsck updates the MMP block at regular intervals, but e2fsck does this occasionally to provide useful information to the sysadmin in case of a detected conflict. For the kernel (since Linux 3.0) MMP adds a "heartbeat" mechanism to periodically write to disk (every few seconds by default) to notify other nodes that the filesystem is still in use and unsafe to modify. Originally-by: Kalpak Shah <kalpak@clusterfs.com> Signed-off-by: Johann Lombardi <johann@whamcloud.com> Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'misc/util.h')
-rw-r--r--misc/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/misc/util.h b/misc/util.h
index d05f17e4..56a77656 100644
--- a/misc/util.h
+++ b/misc/util.h
@@ -24,3 +24,4 @@ extern void parse_journal_opts(const char *opts);
extern void check_mount(const char *device, int force, const char *type);
extern unsigned int figure_journal_size(int size, ext2_filsys fs);
extern void print_check_message(unsigned int, unsigned int);
+extern void dump_mmp_msg(struct mmp_struct *mmp, const char *msg);