diff options
author | Kai Makisara <Kai.Makisara@kolumbus.fi> | 2005-08-02 06:40:47 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-08-08 10:33:48 -0400 |
commit | f03a567054fea4f9d43c50ec91338266c0bd588d (patch) | |
tree | 97b3258660d52dc0359d50f27b5f593c935c9012 /drivers/scsi/st.h | |
parent | 5262d0851cc6692390ee1aa2c55f57f3bfd0a7c7 (diff) |
[SCSI] drivers/scsi/st.c: add reference count and related fixes
I have rediffed the patch against 2.6.13-rc5, done a couple of cosmetic
cleanups, and run some tests. Brian King has acknowledged that it fixes the
problems he has seen. Seems mature enough for inclusion into 2.6.14 (or
later)?
Nate's explanation of the changes:
I've attached patches against 2.6.13rc2. These are basically identical
to my earlier patches, as I found that all issues I'd seen in earlier
kernels still existed in this kernel.
To summarize, the changes are: (more details in my original email)
- add a kref to the scsi_tape structure, and associate reference
counting stuff
- set sr_request->end_io = blk_end_sync_rq so we get notified when an IO
is rejected when the device goes away
- check rq_status when IOs complete, else we don't know that IOs
rejected for a dead device in fact did not complete
- change last_SRpnt so it's set before an async IO is issued (in case
st_sleep_done is bypassed)
- fix a bogus use of last_SRpnt in st_chk_result
Signed-off-by: Nate Dailey <nate.dailey@stratus.com>
Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/st.h')
-rw-r--r-- | drivers/scsi/st.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h index 061da111398e..790acac160bc 100644 --- a/drivers/scsi/st.h +++ b/drivers/scsi/st.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #define _ST_H | 3 | #define _ST_H |
4 | 4 | ||
5 | #include <linux/completion.h> | 5 | #include <linux/completion.h> |
6 | 6 | #include <linux/kref.h> | |
7 | 7 | ||
8 | /* Descriptor for analyzed sense data */ | 8 | /* Descriptor for analyzed sense data */ |
9 | struct st_cmdstatus { | 9 | struct st_cmdstatus { |
@@ -156,6 +156,7 @@ struct scsi_tape { | |||
156 | unsigned char last_sense[16]; | 156 | unsigned char last_sense[16]; |
157 | #endif | 157 | #endif |
158 | struct gendisk *disk; | 158 | struct gendisk *disk; |
159 | struct kref kref; | ||
159 | }; | 160 | }; |
160 | 161 | ||
161 | /* Bit masks for use_pf */ | 162 | /* Bit masks for use_pf */ |