aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2009-03-31 18:23:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 11:59:17 -0400
commitc2d7543851849a6923680cdd7e1047ed1a84a1c5 (patch)
treebf3038819d4be83a1d1e64d7b95bbb3d9d908544 /include/linux/fs.h
parent55a63998b8967615a15e2211ba0ff3a84a565824 (diff)
filesystem freeze: allow SysRq emergency thaw to thaw frozen filesystems
Now that the filesystem freeze operation has been elevated to the VFS, and is just an ioctl away, some sort of safety net for unintentionally frozen root filesystems may be in order. The timeout thaw originally proposed did not get merged, but perhaps something like this would be useful in emergencies. For example, freeze /path/to/mountpoint may freeze your root filesystem if you forgot that you had that unmounted. I chose 'j' as the last remaining character other than 'h' which is sort of reserved for help (because help is generated on any unknown character). I've tested this on a non-root fs with multiple (nested) freezers, as well as on a system rendered unresponsive due to a frozen root fs. [randy.dunlap@oracle.com: emergency thaw only if CONFIG_BLOCK enabled] Signed-off-by: Eric Sandeen <sandeen@redhat.com> Cc: Takashi Sato <t-sato@yk.jp.nec.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 87e7bfc5ebd7..61211ad823fe 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1878,6 +1878,7 @@ extern struct block_device *open_by_devnum(dev_t, fmode_t);
1878extern void invalidate_bdev(struct block_device *); 1878extern void invalidate_bdev(struct block_device *);
1879extern int sync_blockdev(struct block_device *bdev); 1879extern int sync_blockdev(struct block_device *bdev);
1880extern struct super_block *freeze_bdev(struct block_device *); 1880extern struct super_block *freeze_bdev(struct block_device *);
1881extern void emergency_thaw_all(void);
1881extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); 1882extern int thaw_bdev(struct block_device *bdev, struct super_block *sb);
1882extern int fsync_bdev(struct block_device *); 1883extern int fsync_bdev(struct block_device *);
1883extern int fsync_super(struct super_block *); 1884extern int fsync_super(struct super_block *);