diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-23 21:09:34 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:42 -0500 |
commit | 53b67d8dcf47a9d9fef856484a57c7f0b30873fb (patch) | |
tree | 1ca12dfbb941f0a646e200f4c2ca7840e2751638 /fs | |
parent | 037a2d9f48285bf3bfed0f55f1aee04d8b329d07 (diff) | |
download | linux-53b67d8dcf47a9d9fef856484a57c7f0b30873fb.tar.gz linux-53b67d8dcf47a9d9fef856484a57c7f0b30873fb.tar.bz2 linux-53b67d8dcf47a9d9fef856484a57c7f0b30873fb.zip |
bcachefs: better error message in btree_node_write_work()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/btree_io.c | 4 | ||||
-rw-r--r-- | fs/bcachefs/errcode.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c index d99c237c8873..d7cac6a80507 100644 --- a/fs/bcachefs/btree_io.c +++ b/fs/bcachefs/btree_io.c @@ -1798,8 +1798,10 @@ static void btree_node_write_work(struct work_struct *work) bch2_bkey_drop_ptrs(bkey_i_to_s(&wbio->key), ptr, bch2_dev_list_has_dev(wbio->wbio.failed, ptr->dev)); - if (!bch2_bkey_nr_ptrs(bkey_i_to_s_c(&wbio->key))) + if (!bch2_bkey_nr_ptrs(bkey_i_to_s_c(&wbio->key))) { + ret = -BCH_ERR_btree_write_all_failed; goto err; + } if (wbio->wbio.first_btree_write) { if (wbio->wbio.failed.nr) { diff --git a/fs/bcachefs/errcode.h b/fs/bcachefs/errcode.h index 716ff643dc85..9d53b7fd6e84 100644 --- a/fs/bcachefs/errcode.h +++ b/fs/bcachefs/errcode.h @@ -224,6 +224,7 @@ x(BCH_ERR_operation_blocked, nocow_lock_blocked) \ x(EIO, btree_node_read_err) \ x(EIO, sb_not_downgraded) \ + x(EIO, btree_write_all_failed) \ x(BCH_ERR_btree_node_read_err, btree_node_read_err_fixable) \ x(BCH_ERR_btree_node_read_err, btree_node_read_err_want_retry) \ x(BCH_ERR_btree_node_read_err, btree_node_read_err_must_retry) \ |