diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-04-28 12:50:37 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-04-28 12:50:37 -0400 |
commit | 0589d9f3c3cdff28a13f9efc96762d39ef615d22 (patch) | |
tree | 4d7e466a10ba9cd10c8b30e7aad1606e44770314 /libbcachefs/util.c | |
parent | e00e83b84d8de5a6fa279a3c50ad1d7603ee4607 (diff) |
Update bcachefs sources to 6e73711dc355 bcachefs: Read retries are after checksum errors now REQ_FUA
Diffstat (limited to 'libbcachefs/util.c')
-rw-r--r-- | libbcachefs/util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libbcachefs/util.c b/libbcachefs/util.c index 7e6ebe8c..1cff407c 100644 --- a/libbcachefs/util.c +++ b/libbcachefs/util.c @@ -252,6 +252,16 @@ void bch2_prt_u64_base2(struct printbuf *out, u64 v) bch2_prt_u64_base2_nbits(out, v, fls64(v) ?: 1); } +static bool string_is_spaces(const char *str) +{ + while (*str) { + if (*str != ' ') + return false; + str++; + } + return true; +} + void bch2_print_string_as_lines(const char *prefix, const char *lines, bool nonblocking) { @@ -272,6 +282,9 @@ void bch2_print_string_as_lines(const char *prefix, const char *lines, while (*lines) { p = strchrnul(lines, '\n'); + if (!*p && string_is_spaces(lines)) + break; + printk("%s%.*s\n", prefix, (int) (p - lines), lines); if (!*p) break; |