Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148329716
D15435.id42602.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.id42602.diff
View Options
Index: head/sys/cam/scsi/scsi_da.c
===================================================================
--- head/sys/cam/scsi/scsi_da.c
+++ head/sys/cam/scsi/scsi_da.c
@@ -3300,7 +3300,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);
@@ -4443,13 +4442,15 @@
softc->flags |= DA_FLAG_WAS_OTAG;
/*
- * We need to call cam_iosched before we call biodone so that we
- * don't measure any activity that happens in the completion
- * routine, which in the case of sendfile can be quite
- * extensive.
+ * We need to call cam_iosched before we call biodone so that we don't
+ * measure any activity that happens in the completion routine, which in
+ * the case of sendfile can be quite extensive. Release the periph
+ * refcount taken in dastart() for each CCB.
*/
cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb);
xpt_release_ccb(done_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
Wed, Mar 18, 5:09 AM (5 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29882077
Default Alt Text
D15435.id42602.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