aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-06-25 16:01:31 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:03 -0400
commita74a4b97b61beede185b4b3ad359d7d378b0d312 (patch)
tree49ce5e7698f08e84d0ad2f65768e9f34b64d79c5 /fs/btrfs/ctree.h
parent89ce8a63d0c761fbb02089850605360f389477d8 (diff)
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 @@
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/highmem.h> 24#include <linux/highmem.h>
25#include <linux/fs.h> 25#include <linux/fs.h>
26#include <linux/workqueue.h>
27#include <linux/completion.h> 26#include <linux/completion.h>
28#include <linux/backing-dev.h> 27#include <linux/backing-dev.h>
29#include <asm/kmap_types.h> 28#include <asm/kmap_types.h>
@@ -519,15 +518,14 @@ struct btrfs_fs_info {
519 struct backing_dev_info bdi; 518 struct backing_dev_info bdi;
520 spinlock_t hash_lock; 519 spinlock_t hash_lock;
521 struct mutex trans_mutex; 520 struct mutex trans_mutex;
521 struct mutex transaction_kthread_mutex;
522 struct mutex cleaner_mutex;
522 struct mutex alloc_mutex; 523 struct mutex alloc_mutex;
523 struct mutex chunk_mutex; 524 struct mutex chunk_mutex;
524 struct mutex drop_mutex; 525 struct mutex drop_mutex;
525 struct list_head trans_list; 526 struct list_head trans_list;
526 struct list_head hashers; 527 struct list_head hashers;
527 struct list_head dead_roots; 528 struct list_head dead_roots;
528 struct list_head end_io_work_list;
529 struct work_struct end_io_work;
530 spinlock_t end_io_work_lock;
531 atomic_t nr_async_submits; 529 atomic_t nr_async_submits;
532 530
533 /* 531 /*
@@ -543,13 +541,10 @@ struct btrfs_fs_info {
543 struct btrfs_workers workers; 541 struct btrfs_workers workers;
544 struct btrfs_workers endio_workers; 542 struct btrfs_workers endio_workers;
545 struct btrfs_workers submit_workers; 543 struct btrfs_workers submit_workers;
544 struct task_struct *transaction_kthread;
545 struct task_struct *cleaner_kthread;
546 int thread_pool_size; 546 int thread_pool_size;
547 547
548#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
549 struct work_struct trans_work;
550#else
551 struct delayed_work trans_work;
552#endif
553 struct kobject super_kobj; 548 struct kobject super_kobj;
554 struct completion kobj_unregister; 549 struct completion kobj_unregister;
555 int do_barriers; 550 int do_barriers;