Commit 8c8d2d96 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet
Browse files

bcache: move closures to lib/



Prep work for bcachefs - being a fork of bcache it also uses closures

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
Acked-by: default avatarColy Li <colyli@suse.de>
Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
parent 957e4808
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ config BCACHE
	tristate "Block device as cache"
	select BLOCK_HOLDER_DEPRECATED if SYSFS
	select CRC64
	select CLOSURES
	help
	Allows a block device to be used as cache for other devices; uses
	a btree for indexing and the layout is optimized for SSDs.
@@ -19,15 +20,6 @@ config BCACHE_DEBUG
	Enables extra debugging tools, allows expensive runtime checks to be
	turned on.

config BCACHE_CLOSURES_DEBUG
	bool "Debug closures"
	depends on BCACHE
	select DEBUG_FS
	help
	Keeps all active closures in a linked list and provides a debugfs
	interface to list them, which makes it possible to see asynchronous
	operations that get stuck.

config BCACHE_ASYNC_REGISTRATION
	bool "Asynchronous device registration"
	depends on BCACHE
+2 −2
Original line number Diff line number Diff line
@@ -2,6 +2,6 @@

obj-$(CONFIG_BCACHE)	+= bcache.o

bcache-y		:= alloc.o bset.o btree.o closure.o debug.o extents.o\
	io.o journal.o movinggc.o request.o stats.o super.o sysfs.o trace.o\
bcache-y		:= alloc.o bset.o btree.o debug.o extents.o io.o\
	journal.o movinggc.o request.o stats.o super.o sysfs.o trace.o\
	util.o writeback.o features.o
+1 −1
Original line number Diff line number Diff line
@@ -179,6 +179,7 @@
#define pr_fmt(fmt) "bcache: %s() " fmt, __func__

#include <linux/bio.h>
#include <linux/closure.h>
#include <linux/kobject.h>
#include <linux/list.h>
#include <linux/mutex.h>
@@ -192,7 +193,6 @@
#include "bcache_ondisk.h"
#include "bset.h"
#include "util.h"
#include "closure.h"

struct bucket {
	atomic_t	pin;
+0 −1
Original line number Diff line number Diff line
@@ -2905,7 +2905,6 @@ static int __init bcache_init(void)
		goto err;

	bch_debug_init();
	closure_debug_init();

	bcache_is_reboot = false;

+1 −2
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
#define _BCACHE_UTIL_H

#include <linux/blkdev.h>
#include <linux/closure.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/sched/clock.h>
@@ -13,8 +14,6 @@
#include <linux/workqueue.h>
#include <linux/crc64.h>

#include "closure.h"

struct closure;

#ifdef CONFIG_BCACHE_DEBUG
Loading