From owner-freebsd-scsi Sun Aug 3 06:00:57 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA22959 for freebsd-scsi-outgoing; Sun, 3 Aug 1997 06:00:57 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id GAA22953 for ; Sun, 3 Aug 1997 06:00:52 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id WAA16206; Sun, 3 Aug 1997 22:56:57 +1000 Date: Sun, 3 Aug 1997 22:56:57 +1000 From: Bruce Evans Message-Id: <199708031256.WAA16206@godzilla.zeta.org.au> To: FreeBSD-SCSI@FreeBSD.ORG, Shimon@i-Connect.Net Subject: Re: Phoenix... SCSI Devices Minor Mapping Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >I am dealing with systems with very large databases, some systems will >have up to 8 DPT controllers, 4 busses per controller, 15 SCSI hubs per >bus, 7 devices per hub. This gives us well over 3,000 drives. We need >... >Proposal A: > >Divide the minor number as follows: > > f e d c b a 9 8 7 6 5 4 3 2 1 0 >+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ >| c | c | c | c | b | b | b | b | l | l | l | l | t | t | t | t | >+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ > >Where t = Target ID > l = Logigal Unit number > b = Bus number > c = Controller number >... >Similar to Proposal A but with complete renaming and the following bitmap: > > f e d c b a 9 8 7 6 5 4 3 2 1 0 >+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ >| b | b | b | b | t | t | t | t | t | t | t | t | l | l | l | l | >+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ > > 1f 1e 1d 1c 1b 1a 19 18 17 16 15 14 13 12 11 10 >+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ >| - | - | - | - | - | - | - | - | - | - | - | - | c | c | c | c | >+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ > >Where t = Target ID > l = Logigal Unit number > b = Bus number > c = Controller number > - = Reserved Minor numbers are 24 bits (discontiguous), and we already have too many not-quite-right numbering schemes. The two uniform && used ones are: Boot-style device number (see ): f e d c b a 9 8 7 6 5 4 3 2 1 0 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | p | p | p | p | p | p | p | p | M | M | M | M | M | M | M | M | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 1f 1e 1d 1c 1b 1a 19 18 17 16 15 14 13 12 11 10 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | g | g | g | g | a | a | a | a | c | c | c | c | u | u | u | u | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ Where M = Major number p = Partition number (should also contain Slice number) u = Unit number (map this to `t'?) c = Controller number a = Adaptor number ("uba, mba, etc") (map this to to `b'?) g = Magic number (4 bits - very wasteful; map this to 'l'?) There are not enough minor bits, since another bit or two is required to select the encoding scheme. Normal disk device number (see ): f e d c b a 9 8 7 6 5 4 3 2 1 0 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | M | M | M | M | M | M | M | M | u | u | u | u | u | p | p | p | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 1f 1e 1d 1c 1b 1a 19 18 17 16 15 14 13 12 11 10 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | t | t | t | t | t | t | t | u | u | u | u | s | s | s | s | s | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ Where p = Partition number u = Unit number M = Major number s = Slice number t = Type (driver-specific, but not suitable for drive/controller select. Used mainly by SCSI driver to select encoding of other bits. Used by my version of the floppy driver for the floppy type). There are not nearly enough unit bits for you. This is easy enough to handle inside the kernel by making the encoding depend on the driver, but not so easy to handle in config(8) or MAKEDEV. Bruce