Lines Matching +full:in +full:- +full:flight

1 /* SPDX-License-Identifier: GPL-2.0 */
8 * The journal is treated as a circular buffer of buckets - a journal entry
15 * We also keep some things in the journal header that are logically part of the
16 * superblock - all the things that are frequently updated. This is for future
22 * Currently, we don't journal BTREE_REPLACE operations - this will hopefully be
23 * fixed eventually. This isn't a bug - BTREE_REPLACE is used for insertions
31 * Each journal entry contains, in the header, the sequence number of the last
32 * journal entry still open - i.e. that has keys that haven't been flushed to
33 * disk in the btree.
35 * We track this by maintaining a refcount for every open journal entry, in a
36 * fifo; each entry in the fifo corresponds to a particular journal
38 * zero, we pop it off - thus, the size of the fifo tells us the number of open
48 * might contain keys for many journal entries - we handle this by making sure
56 * last_seq - the oldest journal entry we still need. We write last_seq in each
61 * newest journal entry it contains - if we don't need that journal entry we
62 * don't need anything in that bucket anymore. From that we track the last
63 * journal bucket we still need; all this is tracked in struct journal_device
70 * of room in the fifo of refcounts. Since those refcounts are decremented
75 * allocate space for a journal write again - preferentially flushing btree
80 * Only used for holding the journal entries we read in btree_journal_read()
90 * We put two of these in struct journal; we used them for writes to the
91 * journal that are being staged or in flight.
103 /* Embedded in struct cache_set */
115 /* Number of blocks free in the bucket(s) we're currently writing to */
126 * Embedded in struct cache. First three fields refer to the array of journal
127 * buckets, in cache_sb.
132 * journal writes it contains - so we know when a bucket can be reused.
148 /* 1 - discard in flight, -1 - discard completed */
163 (fifo_idx(&(c)->journal.pin, (l)) > fifo_idx(&(c)->journal.pin, (r)))
168 (!(j)->blocks_free || fifo_free(&(j)->pin) <= 1)