bcachefs.h (ac7f0d77c24a20998c150b58caff321a4bbcc828) bcachefs.h (1dd7f9d98de0740b42f1ac3f0b1d8af9c76801de)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BCACHEFS_H
3#define _BCACHEFS_H
4
5/*
6 * SOME HIGH LEVEL CODE DOCUMENTATION:
7 *
8 * Bcache mostly works with cache sets, cache devices, and backing devices.

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

180#define pr_fmt(fmt) "bcachefs: %s() " fmt "\n", __func__
181
182#include <linux/backing-dev-defs.h>
183#include <linux/bug.h>
184#include <linux/bio.h>
185#include <linux/closure.h>
186#include <linux/kobject.h>
187#include <linux/list.h>
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BCACHEFS_H
3#define _BCACHEFS_H
4
5/*
6 * SOME HIGH LEVEL CODE DOCUMENTATION:
7 *
8 * Bcache mostly works with cache sets, cache devices, and backing devices.

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

180#define pr_fmt(fmt) "bcachefs: %s() " fmt "\n", __func__
181
182#include <linux/backing-dev-defs.h>
183#include <linux/bug.h>
184#include <linux/bio.h>
185#include <linux/closure.h>
186#include <linux/kobject.h>
187#include <linux/list.h>
188#include <linux/math64.h>
188#include <linux/mutex.h>
189#include <linux/percpu-refcount.h>
190#include <linux/percpu-rwsem.h>
191#include <linux/rhashtable.h>
192#include <linux/rwsem.h>
193#include <linux/seqlock.h>
194#include <linux/shrinker.h>
195#include <linux/types.h>

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

481 BCH_FS_ALLOCATOR_STARTED,
482 BCH_FS_ALLOCATOR_RUNNING,
483 BCH_FS_INITIAL_GC_DONE,
484 BCH_FS_FSCK_DONE,
485 BCH_FS_STARTED,
486 BCH_FS_RW,
487
488 /* shutdown: */
189#include <linux/mutex.h>
190#include <linux/percpu-refcount.h>
191#include <linux/percpu-rwsem.h>
192#include <linux/rhashtable.h>
193#include <linux/rwsem.h>
194#include <linux/seqlock.h>
195#include <linux/shrinker.h>
196#include <linux/types.h>

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

482 BCH_FS_ALLOCATOR_STARTED,
483 BCH_FS_ALLOCATOR_RUNNING,
484 BCH_FS_INITIAL_GC_DONE,
485 BCH_FS_FSCK_DONE,
486 BCH_FS_STARTED,
487 BCH_FS_RW,
488
489 /* shutdown: */
490 BCH_FS_STOPPING,
489 BCH_FS_EMERGENCY_RO,
490 BCH_FS_WRITE_DISABLE_COMPLETE,
491
492 /* errors: */
493 BCH_FS_ERROR,
494 BCH_FS_ERRORS_FIXED,
495
496 /* misc: */

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

506 struct dentry *btree_format;
507 struct dentry *failed;
508};
509
510struct bch_fs_pcpu {
511 u64 sectors_available;
512};
513
491 BCH_FS_EMERGENCY_RO,
492 BCH_FS_WRITE_DISABLE_COMPLETE,
493
494 /* errors: */
495 BCH_FS_ERROR,
496 BCH_FS_ERRORS_FIXED,
497
498 /* misc: */

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

508 struct dentry *btree_format;
509 struct dentry *failed;
510};
511
512struct bch_fs_pcpu {
513 u64 sectors_available;
514};
515
516struct journal_seq_blacklist_table {
517 size_t nr;
518 struct journal_seq_blacklist_table_entry {
519 u64 start;
520 u64 end;
521 bool dirty;
522 } entries[0];
523};
524
514struct bch_fs {
515 struct closure cl;
516
517 struct list_head list;
518 struct kobject kobj;
519 struct kobject internal;
520 struct kobject opts_dir;
521 struct kobject time_stats;

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

641 * of good data to determine which buckets to reuse first - to weight
642 * those together consistently we keep track of the smallest nonzero
643 * priority of any bucket.
644 */
645 struct bucket_clock bucket_clock[2];
646
647 struct io_clock io_clock[2];
648
525struct bch_fs {
526 struct closure cl;
527
528 struct list_head list;
529 struct kobject kobj;
530 struct kobject internal;
531 struct kobject opts_dir;
532 struct kobject time_stats;

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

652 * of good data to determine which buckets to reuse first - to weight
653 * those together consistently we keep track of the smallest nonzero
654 * priority of any bucket.
655 */
656 struct bucket_clock bucket_clock[2];
657
658 struct io_clock io_clock[2];
659
660 /* JOURNAL SEQ BLACKLIST */
661 struct journal_seq_blacklist_table *
662 journal_seq_blacklist_table;
663 struct work_struct journal_seq_blacklist_gc_work;
664
649 /* ALLOCATOR */
650 spinlock_t freelist_lock;
651 struct closure_waitlist freelist_wait;
652 u64 blocked_allocate;
653 u64 blocked_allocate_open_bucket;
654 u8 open_buckets_freelist;
655 u8 open_buckets_nr_free;
656 struct closure_waitlist open_buckets_wait;

--- 169 unchanged lines hidden ---
665 /* ALLOCATOR */
666 spinlock_t freelist_lock;
667 struct closure_waitlist freelist_wait;
668 u64 blocked_allocate;
669 u64 blocked_allocate_open_bucket;
670 u8 open_buckets_freelist;
671 u8 open_buckets_nr_free;
672 struct closure_waitlist open_buckets_wait;

--- 169 unchanged lines hidden ---