From 7da1ebfd74cbe823b3cfeb634781e510df6773a5 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 21 Mar 2003 22:05:33 +0000 Subject: [PATCH] Mitigate deadlock situation pending a more complete solution. --- sys/geom/geom_disk.c | 4 +++- sys/geom/geom_int.h | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index 57dab5f72e4..6ac4a59008c 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -53,6 +53,7 @@ #include #include #include +#include static struct mtx g_disk_done_mtx; @@ -252,7 +253,8 @@ g_disk_start(struct bio *bp) break; else if (!strcmp(bp->bio_attribute, "GEOM::kerneldump")) g_disk_kerneldump(bp, dp); - else if ((dp->d_ioctl != NULL) && + else if ((g_debugflags & G_F_DISKIOCTL) && + (dp->d_ioctl != NULL) && !strcmp(bp->bio_attribute, "GEOM::ioctl") && bp->bio_length == sizeof *gio) { gio = (struct g_ioctl *)bp->bio_data; diff --git a/sys/geom/geom_int.h b/sys/geom/geom_int.h index 81f80692bb0..0b55670482b 100644 --- a/sys/geom/geom_int.h +++ b/sys/geom/geom_int.h @@ -46,9 +46,12 @@ extern int g_debugflags; * 1 G_T_TOPOLOGY * 2 G_T_BIO * 4 G_T_ACCESS - * 8 enable sanity checks + * 8 Enable sanity checks * 16 Allow footshooting on rank#1 providers + * 32 G_T_DETAILS */ +#define G_F_DISKIOCTL 64 + /* * Various internal actions are tracked by tagging g_event[s] onto