g_mountver.c (0a36cb97a85248372677fcc1683d3aa715255c60) | g_mountver.c (b3f9d8c804bde2bf1199a558a06b81c434fb47df) |
---|---|
1/*- 2 * Copyright (c) 2010 Edward Tomasz Napierala <trasz@FreeBSD.org> 3 * Copyright (c) 2004-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 67 unchanged lines hidden (view full) --- 76 .destroy_geom = g_mountver_destroy_geom, 77 .init = g_mountver_init, 78 .fini = g_mountver_fini 79}; 80 81static void 82g_mountver_done(struct bio *bp) 83{ | 1/*- 2 * Copyright (c) 2010 Edward Tomasz Napierala <trasz@FreeBSD.org> 3 * Copyright (c) 2004-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 67 unchanged lines hidden (view full) --- 76 .destroy_geom = g_mountver_destroy_geom, 77 .init = g_mountver_init, 78 .fini = g_mountver_fini 79}; 80 81static void 82g_mountver_done(struct bio *bp) 83{ |
84 struct g_mountver_softc *sc; |
|
84 struct g_geom *gp; 85 struct bio *pbp; 86 87 if (bp->bio_error != ENXIO) { 88 g_std_done(bp); 89 return; 90 } 91 92 /* 93 * When the device goes away, it's possible that few requests 94 * will be completed with ENXIO before g_mountver_orphan() 95 * gets called. To work around that, we have to queue requests 96 * that failed with ENXIO, in order to send them later. 97 */ 98 gp = bp->bio_from->geom; | 85 struct g_geom *gp; 86 struct bio *pbp; 87 88 if (bp->bio_error != ENXIO) { 89 g_std_done(bp); 90 return; 91 } 92 93 /* 94 * When the device goes away, it's possible that few requests 95 * will be completed with ENXIO before g_mountver_orphan() 96 * gets called. To work around that, we have to queue requests 97 * that failed with ENXIO, in order to send them later. 98 */ 99 gp = bp->bio_from->geom; |
100 sc = gp->softc; |
|
99 100 pbp = bp->bio_parent; 101 KASSERT(pbp->bio_to == LIST_FIRST(&gp->provider), 102 ("parent request was for someone else")); 103 g_destroy_bio(bp); 104 pbp->bio_inbed++; 105 g_mountver_queue(pbp); 106} --- 538 unchanged lines hidden --- | 101 102 pbp = bp->bio_parent; 103 KASSERT(pbp->bio_to == LIST_FIRST(&gp->provider), 104 ("parent request was for someone else")); 105 g_destroy_bio(bp); 106 pbp->bio_inbed++; 107 g_mountver_queue(pbp); 108} --- 538 unchanged lines hidden --- |