diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-10 15:49:12 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-10 15:49:12 -0500 |
commit | 284c1f5148afb088e64c8a77983a43732c4d499b (patch) | |
tree | bf4e74ae467e2533124a6d7617a72fb0bfae3951 /libbcachefs/btree_update_leaf.c | |
parent | a104f0407b7f5de54972389ef10e11dd8c525a96 (diff) |
Update bcachefs sources to dab31ca168 bcachefs: Add some logging for btree node rewrites due to errors
Diffstat (limited to 'libbcachefs/btree_update_leaf.c')
-rw-r--r-- | libbcachefs/btree_update_leaf.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libbcachefs/btree_update_leaf.c b/libbcachefs/btree_update_leaf.c index f01a2e90..6cbc0e5e 100644 --- a/libbcachefs/btree_update_leaf.c +++ b/libbcachefs/btree_update_leaf.c @@ -307,7 +307,7 @@ static inline void btree_insert_entry_checks(struct btree_trans *trans, } static noinline int -bch2_trans_journal_preres_get_cold(struct btree_trans *trans, unsigned u64s, +bch2_trans_journal_preres_get_cold(struct btree_trans *trans, unsigned flags, unsigned long trace_ip) { struct bch_fs *c = trans->c; @@ -316,7 +316,9 @@ bch2_trans_journal_preres_get_cold(struct btree_trans *trans, unsigned u64s, bch2_trans_unlock(trans); ret = bch2_journal_preres_get(&c->journal, - &trans->journal_preres, u64s, 0); + &trans->journal_preres, + trans->journal_preres_u64s, + (flags & JOURNAL_WATERMARK_MASK)); if (ret) return ret; @@ -857,8 +859,7 @@ static inline int do_bch2_trans_commit(struct btree_trans *trans, unsigned flags &trans->journal_preres, trans->journal_preres_u64s, (flags & JOURNAL_WATERMARK_MASK)|JOURNAL_RES_GET_NONBLOCK); if (unlikely(ret == -BCH_ERR_journal_preres_get_blocked)) - ret = bch2_trans_journal_preres_get_cold(trans, - trans->journal_preres_u64s, trace_ip); + ret = bch2_trans_journal_preres_get_cold(trans, flags, trace_ip); if (unlikely(ret)) return ret; @@ -937,7 +938,9 @@ int bch2_trans_commit_error(struct btree_trans *trans, unsigned flags, break; } - ret = bch2_trans_journal_res_get(trans, JOURNAL_RES_GET_CHECK); + ret = bch2_trans_journal_res_get(trans, + (flags & JOURNAL_WATERMARK_MASK)| + JOURNAL_RES_GET_CHECK); if (ret) break; |