summaryrefslogtreecommitdiff
path: root/fs/bcachefs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/super.c')
-rw-r--r--fs/bcachefs/super.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index d640ae188722..32b12311928e 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -277,6 +277,17 @@ struct bch_fs *bch2_uuid_to_fs(__uuid_t uuid)
return c;
}
+void bch2_devs_list_to_text(struct printbuf *out, struct bch_devs_list *d)
+{
+ prt_char(out, '[');
+ darray_for_each(*d, i) {
+ if (i != d->data)
+ prt_char(out, ' ');
+ prt_printf(out, "%u", *i);
+ }
+ prt_char(out, ']');
+}
+
/* Filesystem RO/RW: */
/*
@@ -461,9 +472,11 @@ static bool __bch2_fs_emergency_read_only2(struct bch_fs *c, struct printbuf *ou
bch2_fs_read_only_async(c);
wake_up(&bch2_read_only_wait);
- if (ret)
+ if (ret) {
prt_printf(out, "emergency read only at seq %llu\n",
journal_cur_seq(&c->journal));
+ bch2_prt_task_backtrace(out, current, 2, out->atomic ? GFP_ATOMIC : GFP_KERNEL);
+ }
return ret;
}
@@ -1769,7 +1782,7 @@ static int bch2_dev_alloc(struct bch_fs *c, unsigned dev_idx)
static int __bch2_dev_attach_bdev(struct bch_dev *ca, struct bch_sb_handle *sb,
struct printbuf *err)
{
- unsigned ret;
+ int ret;
if (bch2_dev_is_online(ca)) {
prt_printf(err, "already have device online in slot %u\n",