* XXX Handle any transactions queued to the card
* with XPT_ABORT_CCB.
*/
- while ((q_bio = bioq_first(&softc->bio_queue)) != NULL){
- bioq_remove(&softc->bio_queue, q_bio);
+ while ((q_bio = bioq_takefirst(&softc->bio_queue)) != NULL) {
q_bp = q_bio->bio_buf;
q_bp->b_resid = q_bp->b_bcount;
q_bp->b_error = ENXIO;
xpt_print(periph->path,
"cddone: got error %#x back\n", error);
- while ((q_bio = bioq_first(&softc->bio_queue)) != NULL) {
- bioq_remove(&softc->bio_queue, q_bio);
+ while ((q_bio = bioq_takefirst(&softc->bio_queue)) != NULL) {
q_bp = q_bio->bio_buf;
q_bp->b_resid = q_bp->b_bcount;
q_bp->b_error = EIO;
* XXX Handle any transactions queued to the card
* with XPT_ABORT_CCB.
*/
- while ((q_bio = bioq_first(&softc->bio_queue)) != NULL){
- bioq_remove(&softc->bio_queue, q_bio);
+ while ((q_bio = bioq_takefirst(&softc->bio_queue)) != NULL) {
q_bp = q_bio->bio_buf;
q_bp->b_resid = q_bp->b_bcount;
q_bp->b_error = ENXIO;
* the client can retry these I/Os in the
* proper order should it attempt to recover.
*/
- while ((q_bio = bioq_first(&softc->bio_queue))
- != NULL) {
- bioq_remove(&softc->bio_queue, q_bio);
+ while ((q_bio = bioq_takefirst(&softc->bio_queue)) != NULL) {
q_bp = q_bio->bio_buf;
q_bp->b_resid = q_bp->b_bcount;
q_bp->b_error = EIO;
* XXX Handle any transactions queued to the card
* with XPT_ABORT_CCB.
*/
- while ((q_bio = bioq_first(&softc->bio_queue)) != NULL){
- bioq_remove(&softc->bio_queue, q_bio);
+ while ((q_bio = bioq_takefirst(&softc->bio_queue)) != NULL) {
q_bp = q_bio->bio_buf;
q_bp->b_resid = q_bp->b_bcount;
q_bp->b_error = ENXIO;
*/
softc->flags |= SA_FLAG_TAPE_FROZEN;
- while ((q_bio = bioq_first(&softc->bio_queue)) != NULL) {
- bioq_remove(&softc->bio_queue, q_bio);
+ while ((q_bio = bioq_takefirst(&softc->bio_queue)) != NULL) {
q_bp = q_bio->bio_buf;
q_bp->b_resid = q_bp->b_bcount;
q_bp->b_error = EIO;
sc->busy++;
while (1) {
- bio = bioq_first(&sc->bio_queue);
- if (bio)
- bioq_remove(&sc->bio_queue, bio);
+ bio = bioq_takefirst(&sc->bio_queue);
crit_exit();
if (bio == NULL)
break;
*
* XXX: Return all queued I/O with ENXIO. Is this correct?
*/
- while ((q_bio = bioq_first(&sc->bio_queue)) != NULL){
- bioq_remove(&sc->bio_queue, q_bio);
+ while ((q_bio = bioq_takefirst(&sc->bio_queue)) != NULL) {
q_bp = q_bio->bio_buf;
q_bp->b_resid = q_bp->b_bcount;
q_bp->b_error = ENXIO;
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
*/
/*
sc = dev->si_drv1;
bioqdisksort(&sc->bio_queue, bio);
- while ((bio = bioq_first(&sc->bio_queue)) != NULL) {
- bioq_remove(&sc->bio_queue, bio);
+ while ((bio = bioq_takefirst(&sc->bio_queue)) != NULL) {
bp = bio->bio_buf;
devstat_start_transaction(&sc->stats);
while (mfsp->mfs_active) {
crit_enter();
- while ((bio = bioq_first(&mfsp->bio_queue)) != NULL) {
- bioq_remove(&mfsp->bio_queue, bio);
+ while ((bio = bioq_takefirst(&mfsp->bio_queue)) != NULL) {
crit_exit();
bp = bio->bio_buf;
mfs_doio(bio, mfsp);