summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2015-09-29 20:50:33 -0700
committerChris Mason <clm@fb.com>2015-12-17 12:16:46 -0800
commit73fa48b674e819098c3bafc47618d0e2868191e5 (patch)
treeaae554a8b1f79e877631146fecc1dbd684963ee7 /fs/btrfs/ctree.h
parent1abfbcdf56d9485f050149bc4968c1609f9a0773 (diff)
downloadop-kernel-dev-73fa48b674e819098c3bafc47618d0e2868191e5.zip
op-kernel-dev-73fa48b674e819098c3bafc47618d0e2868191e5.tar.gz
Btrfs: refactor caching_thread()
We're also going to load the free space tree from caching_thread(), so we should refactor some of the common code. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 42c41dc..60df67e 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1262,6 +1262,9 @@ struct btrfs_caching_control {
atomic_t count;
};
+/* Once caching_thread() finds this much free space, it will wake up waiters. */
+#define CACHING_CTL_WAKE_UP (1024 * 1024 * 2)
+
struct btrfs_io_ctl {
void *cur, *orig;
struct page *page;
OpenPOWER on IntegriCloud