geom_disk.c (240629) | geom_disk.c (240822) |
---|---|
1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 20 unchanged lines hidden (view full) --- 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 20 unchanged lines hidden (view full) --- 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/geom/geom_disk.c 240629 2012-09-18 07:57:34Z avg $"); | 37__FBSDID("$FreeBSD: head/sys/geom/geom_disk.c 240822 2012-09-22 12:41:49Z pjd $"); |
38 39#include "opt_geom.h" 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/kernel.h> 44#include <sys/sysctl.h> 45#include <sys/bio.h> --- 584 unchanged lines hidden (view full) --- 630} 631 632void 633disk_gone(struct disk *dp) 634{ 635 struct g_geom *gp; 636 struct g_provider *pp; 637 | 38 39#include "opt_geom.h" 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/kernel.h> 44#include <sys/sysctl.h> 45#include <sys/bio.h> --- 584 unchanged lines hidden (view full) --- 630} 631 632void 633disk_gone(struct disk *dp) 634{ 635 struct g_geom *gp; 636 struct g_provider *pp; 637 |
638 g_topology_lock(); |
|
638 gp = dp->d_geom; | 639 gp = dp->d_geom; |
639 if (gp != NULL) | 640 if (gp != NULL) { |
640 LIST_FOREACH(pp, &gp->provider, provider) 641 g_wither_provider(pp, ENXIO); | 641 LIST_FOREACH(pp, &gp->provider, provider) 642 g_wither_provider(pp, ENXIO); |
643 } 644 g_topology_unlock(); |
|
642} 643 644void 645disk_attr_changed(struct disk *dp, const char *attr, int flag) 646{ 647 struct g_geom *gp; 648 struct g_provider *pp; 649 --- 83 unchanged lines hidden --- | 645} 646 647void 648disk_attr_changed(struct disk *dp, const char *attr, int flag) 649{ 650 struct g_geom *gp; 651 struct g_provider *pp; 652 --- 83 unchanged lines hidden --- |