]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/journal_reclaim.h
Update bcachefs sources to 676dd269f0f8 mean and variance: Promote to lib/math
[bcachefs-tools-debian] / libbcachefs / journal_reclaim.h
index 0fd1af120db551746fc5cac54000c8616914a4f3..7b15d682a0f51d28c47f7d881edb1b08ca24d10c 100644 (file)
@@ -31,7 +31,8 @@ journal_seq_pin(struct journal *j, u64 seq)
        return &j->pin.data[seq & j->pin.mask];
 }
 
-void __bch2_journal_pin_put(struct journal *, u64);
+void bch2_journal_reclaim_fast(struct journal *);
+bool __bch2_journal_pin_put(struct journal *, u64);
 void bch2_journal_pin_put(struct journal *, u64);
 void bch2_journal_pin_drop(struct journal *, struct journal_entry_pin *);
 
@@ -46,17 +47,10 @@ static inline void bch2_journal_pin_add(struct journal *j, u64 seq,
                bch2_journal_pin_set(j, seq, pin, flush_fn);
 }
 
-static inline void bch2_journal_pin_copy(struct journal *j,
-                                        struct journal_entry_pin *dst,
-                                        struct journal_entry_pin *src,
-                                        journal_pin_flush_fn flush_fn)
-{
-       /* Guard against racing with journal_pin_drop(src): */
-       u64 seq = READ_ONCE(src->seq);
-
-       if (seq)
-               bch2_journal_pin_add(j, seq, dst, flush_fn);
-}
+void bch2_journal_pin_copy(struct journal *,
+                          struct journal_entry_pin *,
+                          struct journal_entry_pin *,
+                          journal_pin_flush_fn);
 
 static inline void bch2_journal_pin_update(struct journal *j, u64 seq,
                                           struct journal_entry_pin *pin,