squashfs: add option to panic on errors
authorVincent Whitchurch <vincent.whitchurch@axis.com>
Tue, 29 Jun 2021 02:33:55 +0000 (19:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Jun 2021 17:53:46 +0000 (10:53 -0700)
commit10dde05b89980ef147f590d2735d7dd53aa39c88
tree2724162f69cba85fc4ee0c2a13a9b087dd1d6d0a
parentd98e4d95411bbde2220a7afa38dcc9c14d71acbe
squashfs: add option to panic on errors

Add an errors=panic mount option to make squashfs trigger a panic when
errors are encountered, similar to several other filesystems.  This allows
a kernel dump to be saved using which the corruption can be analysed and
debugged.

Inspired by a pre-fs_context patch by Anton Eliasson.

Link: https://lkml.kernel.org/r/20210527125019.14511-1-vincent.whitchurch@axis.com
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/squashfs/block.c
fs/squashfs/squashfs_fs_sb.h
fs/squashfs/super.c