aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.h
diff options
context:
space:
mode:
authorAndrew Patterson <andrew.patterson@hp.com>2009-09-17 14:46:58 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-10-01 15:15:41 -0400
commitb368c9dd65984d1860b97bff77644c0e3e46df96 (patch)
tree003e31b2bb29eff630c3c156e08f4eaea7d7b6e2 /drivers/block/cciss.h
parentc64bebcd7f33a6260b6d4c9999f797a633a3fa1c (diff)
cciss: Use one scan thread per controller and fix hang during rmmod
Replace the use of one scan kthread per controller with one per driver. Use a queue to hold a list of controllers that need to be rescanned with routines to add and remove controllers from the queue. Fix locking and completion handling to prevent a hang during rmmod. Signed-off-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/cciss.h')
-rw-r--r--drivers/block/cciss.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h
index 06a5db25b298..4fb3639b6cff 100644
--- a/drivers/block/cciss.h
+++ b/drivers/block/cciss.h
@@ -2,6 +2,7 @@
2#define CCISS_H 2#define CCISS_H
3 3
4#include <linux/genhd.h> 4#include <linux/genhd.h>
5#include <linux/mutex.h>
5 6
6#include "cciss_cmd.h" 7#include "cciss_cmd.h"
7 8
@@ -108,6 +109,8 @@ struct ctlr_info
108 int nr_frees; 109 int nr_frees;
109 int busy_configuring; 110 int busy_configuring;
110 int busy_initializing; 111 int busy_initializing;
112 int busy_scanning;
113 struct mutex busy_shutting_down;
111 114
112 /* This element holds the zero based queue number of the last 115 /* This element holds the zero based queue number of the last
113 * queue to be started. It is used for fairness. 116 * queue to be started. It is used for fairness.
@@ -122,8 +125,8 @@ struct ctlr_info
122 /* and saved for later processing */ 125 /* and saved for later processing */
123#endif 126#endif
124 unsigned char alive; 127 unsigned char alive;
125 struct completion *rescan_wait; 128 struct list_head scan_list;
126 struct task_struct *cciss_scan_thread; 129 struct completion scan_wait;
127 struct device dev; 130 struct device dev;
128}; 131};
129 132