diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-08-15 15:34:16 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:06 -0400 |
commit | 5443be45f5cb57d02fd895a0bcaf7e7d9890b1df (patch) | |
tree | 88666dedb8b6e3fa0f693d76a11a05cba29ec13e /fs/btrfs/async-thread.c | |
parent | 777e6bd706ee40897545463871de5b456fbc46dc (diff) |
Btrfs: Give all the worker threads descriptive names
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/async-thread.c')
-rw-r--r-- | fs/btrfs/async-thread.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index bc2980c433ef..5f2f5a8c2289 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c | |||
@@ -153,7 +153,7 @@ int btrfs_stop_workers(struct btrfs_workers *workers) | |||
153 | /* | 153 | /* |
154 | * simple init on struct btrfs_workers | 154 | * simple init on struct btrfs_workers |
155 | */ | 155 | */ |
156 | void btrfs_init_workers(struct btrfs_workers *workers, int max) | 156 | void btrfs_init_workers(struct btrfs_workers *workers, char *name, int max) |
157 | { | 157 | { |
158 | workers->num_workers = 0; | 158 | workers->num_workers = 0; |
159 | INIT_LIST_HEAD(&workers->worker_list); | 159 | INIT_LIST_HEAD(&workers->worker_list); |
@@ -161,6 +161,7 @@ void btrfs_init_workers(struct btrfs_workers *workers, int max) | |||
161 | spin_lock_init(&workers->lock); | 161 | spin_lock_init(&workers->lock); |
162 | workers->max_workers = max; | 162 | workers->max_workers = max; |
163 | workers->idle_thresh = 32; | 163 | workers->idle_thresh = 32; |
164 | workers->name = name; | ||
164 | } | 165 | } |
165 | 166 | ||
166 | /* | 167 | /* |
@@ -184,7 +185,9 @@ int btrfs_start_workers(struct btrfs_workers *workers, int num_workers) | |||
184 | INIT_LIST_HEAD(&worker->worker_list); | 185 | INIT_LIST_HEAD(&worker->worker_list); |
185 | spin_lock_init(&worker->lock); | 186 | spin_lock_init(&worker->lock); |
186 | atomic_set(&worker->num_pending, 0); | 187 | atomic_set(&worker->num_pending, 0); |
187 | worker->task = kthread_run(worker_loop, worker, "btrfs"); | 188 | worker->task = kthread_run(worker_loop, worker, |
189 | "btrfs-%s-%d", workers->name, | ||
190 | workers->num_workers + i); | ||
188 | worker->workers = workers; | 191 | worker->workers = workers; |
189 | if (IS_ERR(worker->task)) { | 192 | if (IS_ERR(worker->task)) { |
190 | kfree(worker); | 193 | kfree(worker); |