bcache.h (e5451c8f8330e03ad3cfa16048b4daf961af434f) bcache.h (be628be09563f8f6e81929efbd7cf3f45c344416)
1#ifndef _BCACHE_H
2#define _BCACHE_H
3
4/*
5 * SOME HIGH LEVEL CODE DOCUMENTATION:
6 *
7 * Bcache mostly works with cache sets, cache devices, and backing devices.
8 *

--- 411 unchanged lines hidden (view full) ---

420
421 DECLARE_HEAP(struct bucket *, heap);
422
423 /*
424 * If nonzero, we know we aren't going to find any buckets to invalidate
425 * until a gc finishes - otherwise we could pointlessly burn a ton of
426 * cpu
427 */
1#ifndef _BCACHE_H
2#define _BCACHE_H
3
4/*
5 * SOME HIGH LEVEL CODE DOCUMENTATION:
6 *
7 * Bcache mostly works with cache sets, cache devices, and backing devices.
8 *

--- 411 unchanged lines hidden (view full) ---

420
421 DECLARE_HEAP(struct bucket *, heap);
422
423 /*
424 * If nonzero, we know we aren't going to find any buckets to invalidate
425 * until a gc finishes - otherwise we could pointlessly burn a ton of
426 * cpu
427 */
428 unsigned invalidate_needs_gc:1;
428 unsigned invalidate_needs_gc;
429
430 bool discard; /* Get rid of? */
431
432 struct journal_device journal;
433
434 /* The rest of this all shows up in sysfs */
435#define IO_ERROR_SHIFT 20
436 atomic_t io_errors;

--- 151 unchanged lines hidden (view full) ---

588 /*
589 * The allocation code needs gc_mark in struct bucket to be correct, but
590 * it's not while a gc is in progress. Protected by bucket_lock.
591 */
592 int gc_mark_valid;
593
594 /* Counts how many sectors bio_insert has added to the cache */
595 atomic_t sectors_to_gc;
429
430 bool discard; /* Get rid of? */
431
432 struct journal_device journal;
433
434 /* The rest of this all shows up in sysfs */
435#define IO_ERROR_SHIFT 20
436 atomic_t io_errors;

--- 151 unchanged lines hidden (view full) ---

588 /*
589 * The allocation code needs gc_mark in struct bucket to be correct, but
590 * it's not while a gc is in progress. Protected by bucket_lock.
591 */
592 int gc_mark_valid;
593
594 /* Counts how many sectors bio_insert has added to the cache */
595 atomic_t sectors_to_gc;
596 wait_queue_head_t gc_wait;
596
597
597 wait_queue_head_t moving_gc_wait;
598 struct keybuf moving_gc_keys;
599 /* Number of moving GC bios in flight */
600 struct semaphore moving_in_flight;
601
602 struct workqueue_struct *moving_gc_wq;
603
604 struct btree *root;
605

--- 323 unchanged lines hidden ---
598 struct keybuf moving_gc_keys;
599 /* Number of moving GC bios in flight */
600 struct semaphore moving_in_flight;
601
602 struct workqueue_struct *moving_gc_wq;
603
604 struct btree *root;
605

--- 323 unchanged lines hidden ---