summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/bio.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2024-06-14 13:52:30 +0930
committerDavid Sterba <dsterba@suse.com>2024-07-11 15:33:29 +0200
commit169aaaf2e0be615ffd4a12adc02db5eb86e8eee1 (patch)
treeb4dab9d20c51361821c969ad9cfb042709283616 /fs/btrfs/bio.c
parentcf31b271e0a65fadb675a6cec433e08ab636f36d (diff)
downloadlinux-stable-169aaaf2e0be615ffd4a12adc02db5eb86e8eee1.tar.gz
linux-stable-169aaaf2e0be615ffd4a12adc02db5eb86e8eee1.tar.bz2
linux-stable-169aaaf2e0be615ffd4a12adc02db5eb86e8eee1.zip
btrfs: introduce new "rescue=ignoremetacsums" mount option
Introduce "rescue=ignoremetacsums" to ignore metadata csums, all the other metadata sanity checks are still kept as is. This new mount option is mostly to allow the kernel to mount an interrupted checksum conversion (at the metadata csum overwrite stage). And since the main part of metadata sanity checks is inside tree-checker, we shouldn't lose much safety, and the new mount option is rescue mount option it requires full read-only mount. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/bio.c')
-rw-r--r--fs/btrfs/bio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c
index f59b00be26f3..f04d93109960 100644
--- a/fs/btrfs/bio.c
+++ b/fs/btrfs/bio.c
@@ -732,7 +732,7 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
* point, so they are handled as part of the no-checksum case.
*/
if (inode && !(inode->flags & BTRFS_INODE_NODATASUM) &&
- !test_bit(BTRFS_FS_STATE_NO_CSUMS, &fs_info->fs_state) &&
+ !test_bit(BTRFS_FS_STATE_NO_DATA_CSUMS, &fs_info->fs_state) &&
!btrfs_is_data_reloc_root(inode->root)) {
if (should_async_write(bbio) &&
btrfs_wq_submit_bio(bbio, bioc, &smap, mirror_num))