diff options
author | 2013-03-29 15:26:45 +0000 | |
---|---|---|
committer | 2013-03-29 15:26:45 +0000 | |
commit | f4e69389f36c7746837532631b9af207c32f355e (patch) | |
tree | 3cb434b9d6d0e1b7cb982816d947894b191fa87f | |
parent | Declare struct pf_state_key in the mbuf and in_pcb header files to (diff) | |
download | wireguard-openbsd-f4e69389f36c7746837532631b9af207c32f355e.tar.xz wireguard-openbsd-f4e69389f36c7746837532631b9af207c32f355e.zip |
Properly release ccbs when restarting a work unit.
-rw-r--r-- | sys/dev/softraid_raid1.c | 5 | ||||
-rw-r--r-- | sys/dev/softraid_raid6.c | 5 | ||||
-rw-r--r-- | sys/dev/softraid_raidp.c | 5 |
3 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c index 699b37a88ff..48776e14a96 100644 --- a/sys/dev/softraid_raid1.c +++ b/sys/dev/softraid_raid1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid1.c,v 1.45 2013/03/29 12:00:59 jsing Exp $ */ +/* $OpenBSD: softraid_raid1.c,v 1.46 2013/03/29 15:26:45 jsing Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -493,11 +493,10 @@ sr_raid1_intr(struct buf *bp) if (xs->flags & SCSI_DATA_IN) { printf("%s: retrying read on block %lld\n", DEVNAME(sc), ccb->ccb_buf.b_blkno); - sr_ccb_put(ccb); if (wu->swu_cb_active == 1) panic("%s: sr_raid1_intr_cb", DEVNAME(sd->sd_sc)); - TAILQ_INIT(&wu->swu_ccb); + sr_wu_release_ccbs(wu); wu->swu_state = SR_WU_RESTART; if (sd->sd_scsi_rw(wu) == 0) goto done; diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c index dbb63f7246d..48c9576b85a 100644 --- a/sys/dev/softraid_raid6.c +++ b/sys/dev/softraid_raid6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid6.c,v 1.39 2013/03/29 13:05:47 jsing Exp $ */ +/* $OpenBSD: softraid_raid6.c,v 1.40 2013/03/29 15:26:45 jsing Exp $ */ /* * Copyright (c) 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org> @@ -764,8 +764,7 @@ sr_raid6_intr(struct buf *bp) if (xs->flags & SCSI_DATA_IN) { printf("%s: retrying read on block %lld\n", DEVNAME(sc), ccb->ccb_buf.b_blkno); - sr_ccb_put(ccb); - TAILQ_INIT(&wu->swu_ccb); + sr_wu_release_ccbs(wu); wu->swu_state = SR_WU_RESTART; if (sd->sd_scsi_rw(wu) == 0) goto done; diff --git a/sys/dev/softraid_raidp.c b/sys/dev/softraid_raidp.c index 843160fc705..e996b5a6d5f 100644 --- a/sys/dev/softraid_raidp.c +++ b/sys/dev/softraid_raidp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raidp.c,v 1.36 2013/03/29 13:05:47 jsing Exp $ */ +/* $OpenBSD: softraid_raidp.c,v 1.37 2013/03/29 15:26:45 jsing Exp $ */ /* * Copyright (c) 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org> @@ -582,8 +582,7 @@ sr_raidp_intr(struct buf *bp) if (xs->flags & SCSI_DATA_IN) { printf("%s: retrying read on block %lld\n", DEVNAME(sc), ccb->ccb_buf.b_blkno); - sr_ccb_put(ccb); - TAILQ_INIT(&wu->swu_ccb); + sr_wu_release_ccbs(wu); wu->swu_state = SR_WU_RESTART; if (sd->sd_scsi_rw(wu) == 0) goto done; |