diff options
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 5c23b464ce7..74d7f37a6fb 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.290 2013/03/10 09:05:12 jsing Exp $ */ +/* $OpenBSD: softraid.c,v 1.291 2013/03/25 16:01:48 jsing Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -4128,6 +4128,28 @@ sr_raid_startwu(struct sr_workunit *wu) } void +sr_raid_recreate_wu(struct sr_workunit *wu) +{ + struct sr_discipline *sd = wu->swu_dis; + struct sr_workunit *wup = wu; + + /* + * Recreate a work unit by releasing the associated CCBs and reissuing + * the SCSI I/O request. This process is then repeated for all of the + * colliding work units. + */ + do { + sr_wu_release_ccbs(wup); + + wup->swu_state = SR_WU_REQUEUE; + if (sd->sd_scsi_rw(wup)) + panic("could not requeue I/O"); + + wup = wup->swu_collider; + } while (wup); +} + +void sr_set_chunk_state(struct sr_discipline *sd, int c, int new_state) { int old_state, s; |