Bug 104816

Summary: # of /dev/sg devices should match scsi devices
Product: Red Hat Enterprise Linux 3 Reporter: Eric Hagberg <hagberg>
Component: MAKEDEVAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: dff
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.3.10-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-01-12 19:50:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Hagberg 2003-09-22 15:39:51 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030805

Description of problem:
Tools like sysinfo (www.magnicomp.com) use the sg interface to query scsi devices.

With the current mismatch between scsi generic and actual scsi devices (sg vs.
sd) sysinfo can't properly interrogate all scsi devices.

If there are 256 /dev/sd devices, the same should hold for /dev/sg (numeric) devs.

For example, /etc/makedev.d/linux-2.4.x should have the following change (IMO):

***************
*** 374,380 ****
  c $SERIAL               20   0  1  32 cub%d
  b $STORAGE              20   0  1   1 hitcd
  
! c $STORAGE              21   0  1  32 sg%d
  b $STORAGE              21   0  1  64 mfma
  b $STORAGE              21  64  1  64 mfmb
  
--- 374,380 ----
  c $SERIAL               20   0  1  32 cub%d
  b $STORAGE              20   0  1   1 hitcd
  
! c $STORAGE              21   0  1  256 sg%d
  b $STORAGE              21   0  1  64 mfma
  b $STORAGE              21  64  1  64 mfmb
  


Version-Release number of selected component (if applicable):
MAKEDEV-3.3.8-1

How reproducible:
Always

Steps to Reproduce:
1. see above
2.
3.
    

Additional info:

Comment 1 Eric Hagberg 2004-01-12 15:50:07 UTC
no comment, nothing?

Comment 2 Nalin Dahyabhai 2004-01-12 19:50:19 UTC
Aargh, was going to check how many generic devices the kernel actually
supports (devices.txt omits that would-be-very-useful information)
before commenting, didn't get to it yet.

My reading of sg.c suggests that it's (number of currently-known SCSI
devices) + 6, which isn't a hard-defined limit.  The driver gets the
entire major, so 256 makes sense here.  Bumping for 3.3.10-1.