]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/journal_reclaim.h
Update bcachefs sources to 6d44812757dd bcachefs: BCH_IOCTL_FSCK_ONLINE
[bcachefs-tools-debian] / libbcachefs / journal_reclaim.h
index f02caa3d49ea74daf97d1054cc3ddbfba250d254..7b15d682a0f51d28c47f7d881edb1b08ca24d10c 100644 (file)
@@ -8,11 +8,9 @@ static inline void journal_reclaim_kick(struct journal *j)
 {
        struct task_struct *p = READ_ONCE(j->reclaim_thread);
 
-       if (p && !j->reclaim_kicked) {
-               j->reclaim_kicked = true;
-               if (p)
-                       wake_up_process(p);
-       }
+       j->reclaim_kicked = true;
+       if (p)
+               wake_up_process(p);
 }
 
 unsigned bch2_journal_dev_buckets_available(struct journal *,
@@ -33,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 *);
 
@@ -48,14 +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)
-{
-       if (journal_pin_active(src))
-               bch2_journal_pin_add(j, src->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,