bcachefs: Improve error messages in device remove path
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 12 Feb 2024 20:19:22 +0000 (15:19 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 14 Mar 2024 01:22:24 +0000 (21:22 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/super.c

index eeeb01156444f4b80dfb278abd8e30940fd2d610..6c0d5dcbc7a3643eb854d2ce82e9fe17464b12e0 100644 (file)
@@ -1601,27 +1601,27 @@ int bch2_dev_remove(struct bch_fs *c, struct bch_dev *ca, int flags)
        __bch2_dev_read_only(c, ca);
 
        ret = bch2_dev_data_drop(c, ca->dev_idx, flags);
-       bch_err_msg(ca, ret, "dropping data");
+       bch_err_msg(ca, ret, "bch2_dev_data_drop()");
        if (ret)
                goto err;
 
        ret = bch2_dev_remove_alloc(c, ca);
-       bch_err_msg(ca, ret, "deleting alloc info");
+       bch_err_msg(ca, ret, "bch2_dev_remove_alloc()");
        if (ret)
                goto err;
 
        ret = bch2_journal_flush_device_pins(&c->journal, ca->dev_idx);
-       bch_err_msg(ca, ret, "flushing journal");
+       bch_err_msg(ca, ret, "bch2_journal_flush_device_pins()");
        if (ret)
                goto err;
 
        ret = bch2_journal_flush(&c->journal);
-       bch_err(ca, "journal error");
+       bch_err_msg(ca, ret, "bch2_journal_flush()");
        if (ret)
                goto err;
 
        ret = bch2_replicas_gc2(c);
-       bch_err_msg(ca, ret, "in replicas_gc2()");
+       bch_err_msg(ca, ret, "bch2_replicas_gc2()");
        if (ret)
                goto err;