]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
btrfs: fix printing of mount info messages for NODATACOW/NODATASUM
authorKyoji Ogasawara <sawara04.o@gmail.com>
Tue, 12 Aug 2025 18:00:07 +0000 (03:00 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:34:15 +0000 (16:34 +0200)
commit 74857fdc5dd2cdcdeb6e99bdf26976fd9299d2bb upstream.

The NODATASUM message was printed twice by mistake and the NODATACOW was
missing from the 'unset' part.  Fix the duplication and make the output
look the same.

Fixes: eddb1a433f26 ("btrfs: add reconfigure callback for fs_context")
CC: stable@vger.kernel.org # 6.8+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Kyoji Ogasawara <sawara04.o@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/super.c

index 3d8735c409501d2b44065ad0174847653df367d0..3213815ed765713ef8d622312e0d0b4cc735dbb1 100644 (file)
@@ -1430,7 +1430,7 @@ static void btrfs_emit_options(struct btrfs_fs_info *info,
 {
        btrfs_info_if_set(info, old, NODATASUM, "setting nodatasum");
        btrfs_info_if_set(info, old, DEGRADED, "allowing degraded mounts");
-       btrfs_info_if_set(info, old, NODATASUM, "setting nodatasum");
+       btrfs_info_if_set(info, old, NODATACOW, "setting nodatacow");
        btrfs_info_if_set(info, old, SSD, "enabling ssd optimizations");
        btrfs_info_if_set(info, old, SSD_SPREAD, "using spread ssd allocation scheme");
        btrfs_info_if_set(info, old, NOBARRIER, "turning off barriers");
@@ -1452,6 +1452,7 @@ static void btrfs_emit_options(struct btrfs_fs_info *info,
        btrfs_info_if_set(info, old, IGNOREMETACSUMS, "ignoring meta csums");
        btrfs_info_if_set(info, old, IGNORESUPERFLAGS, "ignoring unknown super block flags");
 
+       btrfs_info_if_unset(info, old, NODATASUM, "setting datasum");
        btrfs_info_if_unset(info, old, NODATACOW, "setting datacow");
        btrfs_info_if_unset(info, old, SSD, "not using ssd optimizations");
        btrfs_info_if_unset(info, old, SSD_SPREAD, "not using spread ssd allocation scheme");