diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-12-19 18:05:09 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2020-12-19 18:05:09 -0500 |
commit | 80846e9c28e76774daf7d2d46115d73f108b98db (patch) | |
tree | 625f8757948c81571e6678279ddedc3c392862a2 /libbcachefs/journal.c | |
parent | db931a4571817d7d61be6bce306f1d42f7cd3398 (diff) |
Update bcachefs sources to 5241335413 bcachefs: Fix for spinning in journal reclaim on startup
Diffstat (limited to 'libbcachefs/journal.c')
-rw-r--r-- | libbcachefs/journal.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/libbcachefs/journal.c b/libbcachefs/journal.c index 70152103..d5442482 100644 --- a/libbcachefs/journal.c +++ b/libbcachefs/journal.c @@ -443,20 +443,6 @@ unlock: if (!ret) goto retry; - if (WARN_ONCE(ret == cur_entry_journal_full && - !can_discard && - (flags & JOURNAL_RES_GET_RESERVED), - "JOURNAL_RES_GET_RESERVED set but journal full")) { - char *buf; - - buf = kmalloc(4096, GFP_NOFS); - if (buf) { - bch2_journal_debug_to_text(&_PBUF(buf, 4096), j); - pr_err("\n%s", buf); - kfree(buf); - } - } - /* * Journal is full - can't rely on reclaim from work item due to * freezing: @@ -1137,7 +1123,7 @@ out: /* debug: */ -void bch2_journal_debug_to_text(struct printbuf *out, struct journal *j) +void __bch2_journal_debug_to_text(struct printbuf *out, struct journal *j) { struct bch_fs *c = container_of(j, struct bch_fs, journal); union journal_res_state s; @@ -1145,7 +1131,6 @@ void bch2_journal_debug_to_text(struct printbuf *out, struct journal *j) unsigned i; rcu_read_lock(); - spin_lock(&j->lock); s = READ_ONCE(j->reservations); pr_buf(out, @@ -1245,10 +1230,16 @@ void bch2_journal_debug_to_text(struct printbuf *out, struct journal *j) ja->cur_idx, ja->bucket_seq[ja->cur_idx]); } - spin_unlock(&j->lock); rcu_read_unlock(); } +void bch2_journal_debug_to_text(struct printbuf *out, struct journal *j) +{ + spin_lock(&j->lock); + __bch2_journal_debug_to_text(out, j); + spin_unlock(&j->lock); +} + void bch2_journal_pins_to_text(struct printbuf *out, struct journal *j) { struct journal_entry_pin_list *pin_list; |