diff options
author | Chris Mason <clm@fb.com> | 2014-05-22 16:18:52 -0700 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-06-09 17:20:58 -0700 |
commit | a79b7d4b3e8118f265dcb4bdf9a572c392f02708 (patch) | |
tree | a7b4792e01ea5a44467f053e1822d4240e70edc6 /fs/btrfs/ctree.h | |
parent | 40f765805f082ed679c55bf6ab60212e55fb6fc1 (diff) | |
download | blackbird-obmc-linux-a79b7d4b3e8118f265dcb4bdf9a572c392f02708.tar.gz blackbird-obmc-linux-a79b7d4b3e8118f265dcb4bdf9a572c392f02708.zip |
Btrfs: async delayed refs
Delayed extent operations are triggered during transaction commits.
The goal is to queue up a healthly batch of changes to the extent
allocation tree and run through them in bulk.
This farms them off to async helper threads. The goal is to have the
bulk of the delayed operations being done in the background, but this is
also important to limit our stack footprint.
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 4896d7a947eb..02895a126ab9 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1546,6 +1546,9 @@ struct btrfs_fs_info { */ struct btrfs_workqueue *fixup_workers; struct btrfs_workqueue *delayed_workers; + + /* the extent workers do delayed refs on the extent allocation tree */ + struct btrfs_workqueue *extent_workers; struct task_struct *transaction_kthread; struct task_struct *cleaner_kthread; int thread_pool_size; @@ -3268,6 +3271,8 @@ int btrfs_check_space_for_delayed_refs(struct btrfs_trans_handle *trans, void btrfs_put_block_group(struct btrfs_block_group_cache *cache); int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, struct btrfs_root *root, unsigned long count); +int btrfs_async_run_delayed_refs(struct btrfs_root *root, + unsigned long count, int wait); int btrfs_lookup_extent(struct btrfs_root *root, u64 start, u64 len); int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, |