summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/sb-errors.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-10-31 23:43:47 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-11-05 13:12:08 -0500
commit59154f2c66ce5625bc00f3e66af7b71608e991f4 (patch)
tree3bbac65d44157543373f4fc17aef0c670671e6b4 /fs/bcachefs/sb-errors.c
parentbf61dcdfc12c3890c7a062cfcd46c443883defc9 (diff)
downloadlinux-stable-59154f2c66ce5625bc00f3e66af7b71608e991f4.tar.gz
linux-stable-59154f2c66ce5625bc00f3e66af7b71608e991f4.tar.bz2
linux-stable-59154f2c66ce5625bc00f3e66af7b71608e991f4.zip
bcachefs: bch2_prt_datetime()
Improved, better named version of pr_time(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sb-errors.c')
-rw-r--r--fs/bcachefs/sb-errors.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/bcachefs/sb-errors.c b/fs/bcachefs/sb-errors.c
index 3d66f15ae8f5..f0930ab7f036 100644
--- a/fs/bcachefs/sb-errors.c
+++ b/fs/bcachefs/sb-errors.c
@@ -61,7 +61,6 @@ static void bch2_sb_errors_to_text(struct printbuf *out, struct bch_sb *sb,
{
struct bch_sb_field_errors *e = field_to_type(f, errors);
unsigned i, nr = bch2_sb_field_errors_nr_entries(e);
- u64 now = ktime_get_real_seconds();
if (out->nr_tabstops <= 1)
printbuf_tabstop_push(out, 16);
@@ -71,9 +70,7 @@ static void bch2_sb_errors_to_text(struct printbuf *out, struct bch_sb *sb,
prt_tab(out);
prt_u64(out, BCH_SB_ERROR_ENTRY_NR(&e->entries[i]));
prt_tab(out);
- bch2_pr_time_units(out, (now - le64_to_cpu(e->entries[i].last_error_time)) *
- NSEC_PER_SEC);
- prt_str(out, " ago");
+ bch2_prt_datetime(out, le64_to_cpu(e->entries[i].last_error_time));
prt_newline(out);
}
}