diff options
author | Andrew Patterson <andrew.patterson@hp.com> | 2009-09-17 13:46:58 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-10-01 21:15:41 +0200 |
commit | b368c9dd65984d1860b97bff77644c0e3e46df96 (patch) | |
tree | 003e31b2bb29eff630c3c156e08f4eaea7d7b6e2 /drivers/block/cciss.h | |
parent | c64bebcd7f33a6260b6d4c9999f797a633a3fa1c (diff) | |
download | linux-stable-b368c9dd65984d1860b97bff77644c0e3e46df96.tar.gz linux-stable-b368c9dd65984d1860b97bff77644c0e3e46df96.tar.bz2 linux-stable-b368c9dd65984d1860b97bff77644c0e3e46df96.zip |
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.h | 7 |
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 @@ #define CCISS_H #include <linux/genhd.h> +#include <linux/mutex.h> #include "cciss_cmd.h" @@ -108,6 +109,8 @@ struct ctlr_info int nr_frees; int busy_configuring; int busy_initializing; + int busy_scanning; + struct mutex busy_shutting_down; /* This element holds the zero based queue number of the last * queue to be started. It is used for fairness. @@ -122,8 +125,8 @@ struct ctlr_info /* and saved for later processing */ #endif unsigned char alive; - struct completion *rescan_wait; - struct task_struct *cciss_scan_thread; + struct list_head scan_list; + struct completion scan_wait; struct device dev; }; |