Skip to contentSkip to conversation

bcachefs: Don't pretty-print options in /proc/mounts

PATCH Superseded Gabriel de Perthuis 1 participant 1 message Apr 25, 2025 1 message not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 bcachefs: Don't pretty-print options in /proc/mounts

In reply to a message not in the archive

Pretty printing of sizes could introduce spaces and break the expected space-separated format.

---
 fs/bcachefs/opts.c | 2 ++
 1 file changed, 2 insertions(+)
fs/bcachefs/opts.c +2 -0
index b1cf88905b816..65dce3ce46b5b 100644
@@ -461,10 +461,12 @@ void bch2_opt_to_text(struct printbuf *out,
 			       opt->attr.name);
 			return;
 		}
  		prt_printf(out, "%s=", opt->attr.name);
+		// OPT_HUMAN_READABLE can introduce spaces which break the expected tabular format
+		flags &= ~OPT_HUMAN_READABLE;
 	}
  	switch (opt->type) {
 	case BCH_OPT_BOOL:
 	case BCH_OPT_UINT:
Signature · 1 line
2.45.2