[PATCH 2/2] btrfs: Fix incorrect log message related barrier

sawara04.o
2025-05-21T03:27:55Z

From: Kyoji Ogasawara <sawara04.o@gmail.com>

Fix a wrong log message that appears when the "nobarrier" mount
option is unset.
When "nobarrier" is unset, barrier is actually enabled. However,
the log incorrectly stated "turning off barriers".

Signed-off-by: Kyoji Ogasawara <sawara04.o@gmail.com>
---
fs/btrfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 012b63a07ab1..0e8e978519d8 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1462,7 +1462,7 @@ static void btrfs_emit_options(struct btrfs_fs_info *info,
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");
- btrfs_info_if_unset(info, old, NOBARRIER, "turning off barriers");
+ btrfs_info_if_unset(info, old, NOBARRIER, "turning on barriers");
btrfs_info_if_unset(info, old, NOTREELOG, "enabling tree log");
btrfs_info_if_unset(info, old, SPACE_CACHE, "disabling disk space caching");
btrfs_info_if_unset(info, old, FREE_SPACE_TREE, "disabling free space tree");
--
2.49.0