diff options
author | Omar Sandoval <osandov@fb.com> | 2015-09-29 20:50:33 -0700 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-12-17 12:16:46 -0800 |
commit | 73fa48b674e819098c3bafc47618d0e2868191e5 (patch) | |
tree | aae554a8b1f79e877631146fecc1dbd684963ee7 /fs/btrfs/ctree.h | |
parent | 1abfbcdf56d9485f050149bc4968c1609f9a0773 (diff) | |
download | lwn-73fa48b674e819098c3bafc47618d0e2868191e5.tar.gz lwn-73fa48b674e819098c3bafc47618d0e2868191e5.zip |
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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 42c41dc68cbb..60df67efef96 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; |