Skip to contentSkip to conversation

btrfs: remove colon from messages with state

PATCH In review David Sterba 2 participants 2 messages Apr 9, 2024 – Apr 11, 2024 Btrfs file system

lore
Share & tools
lore

David Sterba

author maintainer
#0 lore raw

PATCH 1/1 btrfs: remove colon from messages with state

The message format in syslog is usually made of two parts:

prefix ":" message

Various tools parse the prefix up to the first ":". When there's an additional status of a btrfs filesystem like

  [5.199782] BTRFS info (device nvme1n1p1: state M): use zstd compression, level 9

where 'M' is for remount, there's one more ":" that does not conform to the format. Remove it.

---
 fs/btrfs/messages.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/messages.c +1 -1
index c96dd66fd0f7..210d9c82e2ae 100644
@@ -7,7 +7,7 @@
 
 #ifdef CONFIG_PRINTK
 
-#define STATE_STRING_PREFACE	": state "
+#define STATE_STRING_PREFACE	" state "
 #define STATE_STRING_BUF_LEN	(sizeof(STATE_STRING_PREFACE) + BTRFS_FS_STATE_COUNT + 1)
 
 /*
Signature · 1 line
2.44.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · David Sterba

The message format in syslog is usually made of two parts:

prefix ":" message

Quoted 8 lines

Various tools parse the prefix up to the first ":". When there's an additional status of a btrfs filesystem like

   [5.199782] BTRFS info (device nvme1n1p1: state M): use zstd compression, level 9

where 'M' is for remount, there's one more ":" that does not conform to the format. Remove it.