summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason2008-06-25 22:01:31 +0200
committerChris Mason2008-09-25 17:04:03 +0200
commita74a4b97b61beede185b4b3ad359d7d378b0d312 (patch)
tree49ce5e7698f08e84d0ad2f65768e9f34b64d79c5 /fs/btrfs/ctree.h
parentAdd btrfs_end_transaction_throttle to force writers to wait for pending commits (diff)
downloadkernel-qcow2-linux-a74a4b97b61beede185b4b3ad359d7d378b0d312.tar.gz
kernel-qcow2-linux-a74a4b97b61beede185b4b3ad359d7d378b0d312.tar.xz
kernel-qcow2-linux-a74a4b97b61beede185b4b3ad359d7d378b0d312.zip
Btrfs: Replace the transaction work queue with kthreads
This creates one kthread for commits and one kthread for deleting old snapshots. All the work queues are removed. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index e9bbb53eda63..244fe86bcc55 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -23,7 +23,6 @@
#include <linux/mm.h>
#include <linux/highmem.h>
#include <linux/fs.h>
-#include <linux/workqueue.h>
#include <linux/completion.h>
#include <linux/backing-dev.h>
#include <asm/kmap_types.h>
@@ -519,15 +518,14 @@ struct btrfs_fs_info {
struct backing_dev_info bdi;
spinlock_t hash_lock;
struct mutex trans_mutex;
+ struct mutex transaction_kthread_mutex;
+ struct mutex cleaner_mutex;
struct mutex alloc_mutex;
struct mutex chunk_mutex;
struct mutex drop_mutex;
struct list_head trans_list;
struct list_head hashers;
struct list_head dead_roots;
- struct list_head end_io_work_list;
- struct work_struct end_io_work;
- spinlock_t end_io_work_lock;
atomic_t nr_async_submits;
/*
@@ -543,13 +541,10 @@ struct btrfs_fs_info {
struct btrfs_workers workers;
struct btrfs_workers endio_workers;
struct btrfs_workers submit_workers;
+ struct task_struct *transaction_kthread;
+ struct task_struct *cleaner_kthread;
int thread_pool_size;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
- struct work_struct trans_work;
-#else
- struct delayed_work trans_work;
-#endif
struct kobject super_kobj;
struct completion kobj_unregister;
int do_barriers;