From owner-freebsd-current Wed Jan 22 11:44: 8 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A51237B401; Wed, 22 Jan 2003 11:44:07 -0800 (PST) Received: from mail.tcoip.com.br (erato.tco.net.br [200.220.254.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACF2043F43; Wed, 22 Jan 2003 11:43:55 -0800 (PST) (envelope-from dcs@tcoip.com.br) Received: from tcoip.com.br ([10.0.2.6]) by mail.tcoip.com.br (8.11.6/8.11.6) with ESMTP id h0MJhge30851; Wed, 22 Jan 2003 17:43:42 -0200 Message-ID: <3E2EF46E.20600@tcoip.com.br> Date: Wed, 22 Jan 2003 17:43:42 -0200 From: "Daniel C. Sobral" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3a) Gecko/20030122 X-Accept-Language: en-us, en, pt-br, ja MIME-Version: 1.0 To: phk@FreeBSD.ORG Cc: freebsd-current@FreeBSD.ORG Subject: Re: I want a sysctl kern.allow_shooting_into_my_foot! References: <25074.1043238359@critter.freebsd.dk> In-Reply-To: <25074.1043238359@critter.freebsd.dk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG phk@FreeBSD.ORG wrote: > > Hmm, since this happens during boot, you cannot set the debug flag > with sysctl in time, so you have to compile a custom kernel for it: > > in sys/geom/geom_kern.c change: > > int g_debugflags; > > to > int g_debugflags = G_T_ACCESS; > > and recompile + reboot. > > This will make GEOM printf all "access" (ie: open/close) changes and > you should hopefully be able to deduce where the open of your MO comes > from. > > If this is not enough, you can try to set > > int g_debugflags = G_T_ACCESS | G_T_TOPOLOGY; > > But that will result in much more debugging output. > > You can turn this debugging off from userland with: > sysctl kern.geom.debugflags=0 Why not make it a loader tunable? -- Daniel C. Sobral (8-DCS) Gerencia de Operacoes Divisao de Comunicacao de Dados Coordenacao de Seguranca TCO Fones: 55-61-313-7654/Cel: 55-61-9618-0904 E-mail: Daniel.Capo@tco.net.br Daniel.Sobral@tcoip.com.br dcs@tcoip.com.br Outros: dcs@newsguy.com dcs@freebsd.org capo@notorious.bsdconspiracy.net Art is anything you can get away with. -- Marshall McLuhan. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message