Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111847610
D15435.id42548.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15435.id42548.diff
View Options
Index: FreeBSD/sys/cam/scsi/scsi_da.c
===================================================================
--- FreeBSD/sys/cam/scsi/scsi_da.c
+++ FreeBSD/sys/cam/scsi/scsi_da.c
@@ -309,7 +309,7 @@
struct cam_iosched_softc *cam_iosched;
struct bio_queue_head delete_run_queue;
LIST_HEAD(, ccb_hdr) pending_ccbs;
- int refcount; /* Active xpt_action() calls */
+ int refcount; /* Active CCBs */
da_state state;
da_flags flags;
da_quirks quirks;
@@ -3243,7 +3243,6 @@
cam_periph_unlock(periph);
xpt_action(start_ccb);
cam_periph_lock(periph);
- softc->refcount--;
/* May have more work to do, so ensure we stay scheduled */
daschedule(periph);
@@ -4402,6 +4401,13 @@
*/
cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb);
xpt_release_ccb(done_ccb);
+
+ /*
+ * Release the periph refcount taken in dastart() for each CCB.
+ */
+ KASSERT(softc->refcount >= 1, ("dadone softc %p refcount %d", softc, softc->refcount));
+ softc->refcount--;
+
if (state == DA_CCB_DELETE) {
TAILQ_HEAD(, bio) queue;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 10, 6:07 AM (5 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17080673
Default Alt Text
D15435.id42548.diff (1 KB)
Attached To
Mode
D15435: expand scope of da refcount to protect I/Os in flight
Attached
Detach File
Event Timeline
Log In to Comment