From owner-freebsd-current@FreeBSD.ORG Tue Jan 25 15:09:21 2005 Return-Path: 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 BD28016A4CF; Tue, 25 Jan 2005 15:09:21 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF4E043D31; Tue, 25 Jan 2005 15:09:20 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id j0PF8s7j086051; Tue, 25 Jan 2005 16:08:54 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Robert Watson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 25 Jan 2005 14:54:29 GMT." Date: Tue, 25 Jan 2005 16:08:54 +0100 Message-ID: <86050.1106665734@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: pete@altadena.net cc: current@freebsd.org cc: "M. Warner Losh" Subject: Re: Devd event from GEOM? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2005 15:09:22 -0000 In message , Robert Watson writes: >However, many device nodes can only be opened "exclusively", security >event auditing will occur, or opening will have side effects. Opening a >device node to find out what type it is currently seems not to work very >well and/or be undesirable. I was mostly for the benefit of dd(1) as far as I recall. >> Welcome to the world of dynamic hardware. > >While you could imagine user space controlling the stepping of exposed >device nodes to prevent inconsistency, it's similarly easy to imagine the >potential feedback loops, deadlocks, etc, that would occur. Given that we >already mediate use of the /dev name space, I think we have to be able to >rely on sane use of that space: if ad0 is replaced almost immediately by >ad0, it shouldn't really matter which you get, at least in as much as that >the consumer can figure out if it happened (should it matter, which I >suspect in most cases it won't). I disagree. If devd tells you that some FC mesh just got plugged in and you interpret that to start a backup onto your dedicated FC drive, then it matters a lot if it got almost instantly replaced by a USB key. I would probably put a file with an encrypted magic marker on the drive and refuse backup if it wasn't there. Or something. I think it is waaay out of what should be handled by an operating system, we're into the territory which makes companies shell out millions for things like Unicenter or Tivoli in the vain hope that adding more complex software will improve the situation. I think we should have DEVFS inject "ad0 appeared, type=DISK" to devd and leave it at that. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.