Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174212169
D60155.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
D60155.diff
View Options
diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c
--- a/sys/cam/nvme/nvme_da.c
+++ b/sys/cam/nvme/nvme_da.c
@@ -1330,6 +1330,7 @@
} else { /* state == NDA_CCB_TRIM */
struct nda_trim_request *trim;
struct bio *bp1, *bp2;
+ union ccb *ccb = done_ccb;
TAILQ_HEAD(, bio) queue;
trim = nvmeio->ccb_trim;
@@ -1349,11 +1350,6 @@
* so we can keep proper counts.
*/
bp1 = TAILQ_FIRST(&queue);
- cam_iosched_bio_complete(softc->cam_iosched, bp1, done_ccb);
- xpt_release_ccb(done_ccb);
- softc->outstanding_cmds--;
- ndaschedule(periph);
- cam_periph_unlock(periph);
while ((bp2 = TAILQ_FIRST(&queue)) != NULL) {
TAILQ_REMOVE(&queue, bp2, bio_queue);
bp2->bio_error = error;
@@ -1362,10 +1358,14 @@
bp2->bio_resid = bp1->bio_bcount;
} else
bp2->bio_resid = 0;
- if (bp1 != bp2)
- cam_iosched_bio_complete(softc->cam_iosched, bp2, NULL);
+ cam_iosched_bio_complete(softc->cam_iosched, bp2, ccb);
biodone(bp2);
+ ccb = NULL;
}
+ xpt_release_ccb(done_ccb);
+ softc->outstanding_cmds--;
+ ndaschedule(periph);
+ cam_periph_unlock(periph);
}
return;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 2, 9:55 AM (4 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39977465
Default Alt Text
D60155.diff (1 KB)
Attached To
Mode
D60155: nvme_da: drop periph lock after updating stats for trim
Attached
Detach File
Event Timeline
Log In to Comment