From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 24 18:23:49 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A50816A420 for ; Fri, 24 Feb 2006 18:23:49 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id A034043D48 for ; Fri, 24 Feb 2006 18:23:48 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k1OIMcuE029880; Fri, 24 Feb 2006 11:22:43 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 24 Feb 2006 11:23:10 -0700 (MST) Message-Id: <20060224.112310.48529779.imp@bsdimp.com> To: nielsen@memberwebs.com, nielsen-list@memberwebs.com From: "M. Warner Losh" In-Reply-To: <20060222190919.C6B9FDCA99B@mail.npubs.com> References: <20060222190919.C6B9FDCA99B@mail.npubs.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 24 Feb 2006 11:22:43 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: devctl attach/detach notification for disks X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2006 18:23:49 -0000 In message: <20060222190919.C6B9FDCA99B@mail.npubs.com> Nate Nielsen writes: : I'm working on a bit of code to get devctl notifications for attaching : and removing of disks. This would allow actions to be taken via devd : when a disk is attached or removed from the system. I'm not sure I like the API changes you've made to subr_bus. Why are they needed? : Currently I have the attach and detach notifications hooked into : disk_create() and disk_destroy() in geom_disk.c. See attached (rough) : patch. : : However at these points the disks are not yet present in the /dev/ : filesystem. Anyone have any clues or tips for a better place to hook : these notifications into the system? That's one of the main reasons that this hasn't happened yet. The hard part is getting all of the devices in place before sending notifications. Robert Watson had a similar thing that I think solved some of the problems a little better... Warner