Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2008 06:12:32 +0400 (MSD)
From:      Dmitry Marakasov <amdmi3@amdmi3.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/122838: [devfs] devfs doesn't handle complex paths (like zvol/pool/vms) good
Message-ID:  <20080417021232.2AC661702D@hades.panopticon>
Resent-Message-ID: <200804170220.m3H2K1xN038209@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         122838
>Category:       kern
>Synopsis:       [devfs] devfs doesn't handle complex paths (like zvol/pool/vms) good
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 17 02:20:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 7.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 7.0-RELEASE FreeBSD 7.0-RELEASE #5: Fri Mar 14 14:26:43 MSK 2008 root@hades.panopticon:/usr/obj/usr/src/sys/HADES i386


>Description:
devfs behavior on nested paths is really unintuitive and pretty hard to tune.

Suppose I have ZFS zvol under pool/vms/win2000 and I want to unhide node for it in the jail.

Here's what it look like unhidden:

% find /dev/zvol
/dev/zvol
/dev/zvol/pool
/dev/zvol/pool/vms
/dev/zvol/pool/vms/win2000

Now I hide everything and try to unhide desired node (first is ruleset, next `find /dev` output)

(1) hide
    path zvol unhide
/dev
/dev/zvol
(2) hide
    path zvol unhide
    path zvol/pool unhide
/dev
/dev/zvol
(3) hide
    path zvol/pool/vms/win2000 unhide
/dev
(4) hide
     path zvol/* unhide
/dev
(5) hide
    path zvol unhide
    path pool unhide
/dev
/dev/zvol
/dev/zvol/pool
(6) hide
    path zvol unhide
    path pool unhide
    path vms unhide
/dev
/dev/zvol
/dev/zvol/pool
/dev/zvol/pool/vms
(7) hide
    path zvol unhide
    path pool unhide
    path vms unhide
    path win2000 unhide
/dev
/dev/zvol
/dev/zvol/pool
/dev/zvol/pool/vms
(8) hide
    path zvol unhide
    path pool unhide
    path vms unhide
    path *win2000 unhide
/dev
/dev/zvol
/dev/zvol/pool
/dev/zvol/pool/vms
/dev/zvol/pool/vms/win2000
(9) hide
    path zvol unhide
    path pool unhide
    path vms/* unhide
    path *win2000 unhide
/dev
/dev/zvol
/dev/zvol/pool

This seems really broken.
First, though man says that path is a glob, and it's used so in /etc/defaults/devfs.rules (add path 'fd/*' unhide) nested directories don't work at all (2,3,4). Specifying them separately works (5,6), but that's not quite good, as rules for different hierarchies may interfere with each other. Also, cases (7,8) is really strange, why do I need * here for a device node?

>How-To-Repeat:
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080417021232.2AC661702D>