From owner-freebsd-bugs Tue Aug 26 08:20:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA16429 for bugs-outgoing; Tue, 26 Aug 1997 08:20:10 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA16377; Tue, 26 Aug 1997 08:20:02 -0700 (PDT) Resent-Date: Tue, 26 Aug 1997 08:20:02 -0700 (PDT) Resent-Message-Id: <199708261520.IAA16377@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, dima@tejblum.dnttm.rssi.ru Received: from helios.dnttm.ru (root@dnttm.wave.ras.ru [194.85.104.197]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA16201; Tue, 26 Aug 1997 08:18:03 -0700 (PDT) Received: (from uucp@localhost) by helios.dnttm.ru (8.8.5/8.8.5/IP-3) with UUCP id TAA21354; Tue, 26 Aug 1997 19:16:17 +0400 Received: (from dima@localhost) by tejblum.dnttm.rssi.ru (8.8.7/8.8.5) id TAA00594; Tue, 26 Aug 1997 19:10:50 +0400 (MSD) Message-Id: <199708261510.TAA00594@tejblum.dnttm.rssi.ru> Date: Tue, 26 Aug 1997 19:10:50 +0400 (MSD) From: Dmitrij Tejblum Reply-To: dima@tejblum.dnttm.rssi.ru To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: julian@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: kern/4396: DEVFS: new devices on the 'backing plane' never propagated to 'front planes' Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 4396 >Category: kern >Synopsis: DEVFS: new devices on the 'backing plane' never propagated to 'front planes' >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 26 08:20:01 PDT 1997 >Last-Modified: >Originator: Dmitrij Tejblum >Organization: >Release: FreeBSD 3.0-CURRENT i386 >Environment: >Description: Function 'devfs_propogate' should do the propagation. It tryes to iterate front planes with the following cycl: for (adnp = pdnp->nextsibling; adnp != pdnp->nextsibling; adnp = adnp->nextsibling) Obvious, the cycl will never run, because after adnp = pdnp->nextsibling condition adnp != pdnp->nextsibling cannot be true. >How-To-Repeat: You can rproduce the problem with the vn device: Create a big zero-filled file. Mount a DEVFS somewhere. Set 'labels' option to a vn device: vnconfig -s labels /dev/vn0 Attach the file to the vn device: vnconfig -c /dev/vn0 /usr/fsimage Disklabel the device: disklabel -Brw vn0 auto See that vn0c didn't appeared in the DEVFS. If you already have disklabeled disk image, you may simple do: vnconfig -s labels /dev/vn0 vnconfig -c /dev/vn0 /usr/fsimage and see if it's partitions appeared in the DEVFS. (Unfortunately, even with the following fix, after vnconfig -s labels -c /dev/vn0 /usr/fsimage partitions don't appeared in DEVFS. 2 separate command, as above, should be used. It is a bug in vnconfig/vn device) >Fix: --- devfs_tree.c.00 Thu Jul 17 15:12:23 1997 +++ devfs_tree.c Mon Aug 25 23:57:48 1997 @@ -543,7 +543,7 @@ * Find the other instances of the parent node * \***********************************************/ for (adnp = pdnp->nextsibling; - adnp != pdnp->nextsibling; + adnp != pdnp; adnp = adnp->nextsibling) { /* @@ -551,7 +551,7 @@ * if the node already exists on that plane it won't be * re-made.. */ - if ( error = dev_add_entry(child->name, pdnp, type, + if ( error = dev_add_entry(child->name, adnp, type, NULL, dnp, adnp->dvm, &newnmp)) { printf("duplicating %s failed\n",child->name); } >Audit-Trail: >Unformatted: