diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-03-02 17:10:54 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2020-03-02 17:10:54 -0500 |
commit | 2d238045d3a7262c4ba58da7eeedbc4a0df5b59f (patch) | |
tree | 8831965bc5bbc3200ab573b4e689ba3ab75877d1 /libbcachefs/journal_reclaim.h | |
parent | 14e736e62757706afd6f451118cad7f34e5766da (diff) |
Update bcachefs sources to 4a4139a563 bcachefs: Fix extent_sort_fix_overlapping()
Diffstat (limited to 'libbcachefs/journal_reclaim.h')
-rw-r--r-- | libbcachefs/journal_reclaim.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/libbcachefs/journal_reclaim.h b/libbcachefs/journal_reclaim.h index 9bf982a..883a0a5 100644 --- a/libbcachefs/journal_reclaim.h +++ b/libbcachefs/journal_reclaim.h @@ -29,16 +29,24 @@ journal_seq_pin(struct journal *j, u64 seq) } void bch2_journal_pin_put(struct journal *, u64); - -void bch2_journal_pin_add(struct journal *, u64, struct journal_entry_pin *, - journal_pin_flush_fn); -void bch2_journal_pin_update(struct journal *, u64, struct journal_entry_pin *, - journal_pin_flush_fn); void bch2_journal_pin_drop(struct journal *, struct journal_entry_pin *); -void bch2_journal_pin_add_if_older(struct journal *, - struct journal_entry_pin *, - struct journal_entry_pin *, - journal_pin_flush_fn); + +void __bch2_journal_pin_add(struct journal *, u64, struct journal_entry_pin *, + journal_pin_flush_fn); + +static inline void bch2_journal_pin_add(struct journal *j, u64 seq, + struct journal_entry_pin *pin, + journal_pin_flush_fn flush_fn) +{ + if (unlikely(!journal_pin_active(pin))) + __bch2_journal_pin_add(j, seq, pin, flush_fn); +} + +void bch2_journal_pin_copy(struct journal *, + struct journal_entry_pin *, + struct journal_entry_pin *, + journal_pin_flush_fn); + void bch2_journal_pin_flush(struct journal *, struct journal_entry_pin *); void bch2_journal_do_discards(struct journal *); |