diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-07-20 00:20:18 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:37 +0300 |
commit | 1ed0a5d280ef7a1183b42b2fcc13d919925f1b6e (patch) | |
tree | 1bbed805fd079f8991867b0085a00e7c2d0b02de /fs/bcachefs/fsck.c | |
parent | a0cb8d784f309d22323974e47b103bf01d0b62c0 (diff) | |
download | linux-1ed0a5d280ef7a1183b42b2fcc13d919925f1b6e.tar.xz |
bcachefs: Convert fsck errors to errcode.h
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/fsck.c')
-rw-r--r-- | fs/bcachefs/fsck.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index 29d731a12436..306983811c1b 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -838,15 +838,14 @@ bad_hash: "hashed to %llu\n%s", bch2_btree_ids[desc.btree_id], hash_k.k->p.inode, hash_k.k->p.offset, hash, (printbuf_reset(&buf), - bch2_bkey_val_to_text(&buf, c, hash_k), buf.buf)) == FSCK_ERR_IGNORE) - return 0; - - ret = hash_redo_key(trans, desc, hash_info, k_iter, hash_k); - if (ret) { - bch_err(c, "hash_redo_key err %s", bch2_err_str(ret)); - return ret; + bch2_bkey_val_to_text(&buf, c, hash_k), buf.buf))) { + ret = hash_redo_key(trans, desc, hash_info, k_iter, hash_k); + if (ret) { + bch_err(c, "hash_redo_key err %s", bch2_err_str(ret)); + return ret; + } + ret = -BCH_ERR_transaction_restart_nested; } - ret = -BCH_ERR_transaction_restart_nested; fsck_err: goto out; } @@ -1137,14 +1136,13 @@ static int check_i_sectors(struct btree_trans *trans, struct inode_walker *w) if (fsck_err_on(!(i->inode.bi_flags & BCH_INODE_I_SECTORS_DIRTY), c, "inode %llu:%u has incorrect i_sectors: got %llu, should be %llu", w->cur_inum, i->snapshot, - i->inode.bi_sectors, i->count) == FSCK_ERR_IGNORE) - continue; - - i->inode.bi_sectors = i->count; - ret = write_inode(trans, &i->inode, i->snapshot); - if (ret) - break; - ret2 = -BCH_ERR_transaction_restart_nested; + i->inode.bi_sectors, i->count)) { + i->inode.bi_sectors = i->count; + ret = write_inode(trans, &i->inode, i->snapshot); + if (ret) + break; + ret2 = -BCH_ERR_transaction_restart_nested; + } } fsck_err: if (ret) |