From 882dbe0cec9651bf6a6df500178149453726c1e1 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Fri, 16 Oct 2020 11:29:19 -0400 Subject: btrfs: introduce mount option rescue=ignoredatacsums There are cases where you can end up with bad data csums because of misbehaving applications. This happens when an application modifies a buffer in-flight when doing an O_DIRECT write. In order to recover the file we need a way to turn off data checksums so you can copy the file off, and then you can delete the file and restore it properly later. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/sysfs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/btrfs/sysfs.c') diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index e9f482989415..86f70a60447b 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -333,6 +333,7 @@ static const char *rescue_opts[] = { "usebackuproot", "nologreplay", "ignorebadroots", + "ignoredatacsums", }; static ssize_t supported_rescue_options_show(struct kobject *kobj, -- cgit v1.2.3