]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
bcachefs: Fix printing of device durability
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 30 Dec 2023 00:16:14 +0000 (19:16 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 6 Jan 2024 04:24:19 +0000 (23:24 -0500)
BCH_MEMBER_DURABILITY() was not present initially; a value of 0 means
use the default, nonzero means use v - 1.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/sb-members.c

index 4c19a8096c1dfc4ced3b8ea2db21bedda3cd1352..a44a238bf8b5550023226844734424b1211c812a 100644 (file)
@@ -266,7 +266,7 @@ static void member_to_text(struct printbuf *out,
 
        prt_str(out, "Durability:");
        prt_tab(out);
-       prt_printf(out, "%llu", BCH_MEMBER_DURABILITY(&m));
+       prt_printf(out, "%llu", BCH_MEMBER_DURABILITY(&m) ? BCH_MEMBER_DURABILITY(&m) - 1 : 1);
        prt_newline(out);
 
        prt_printf(out, "Discard:");