Subject: misc/7105: inconsistent usage in inode(5)/fs(5) vs. newfs(8)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <xela@mit.edu>
List: netbsd-bugs
Date: 03/08/1999 00:51:51
>Number:         7105
>Category:       misc
>Synopsis:       inode(5)/fs(5) use abbrev. "NBPI" w/o explanation, and are the only use of it.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar  7 22:05:00 1999
>Last-Modified:
>Originator:     Alex
>Organization:
MIT
	
>Release:        1.3.3
>Environment:
	
System: NetBSD eratosthenes 1.3.3 NetBSD 1.3.3 (TERC_BASIC) #0: Sat Feb 27 04:00:54 EST 1999 root@eratosthenes:/usr/src133/sys/arch/i386/compile/TERC_BASIC i386


>Description:

The inode(5) man page (which is also the fs(5) man page) says:

     Each file system has a statically allocated number of inodes.  An inode
     is allocated for each NBPI bytes of disk space.  The inode allocation
     strategy is extremely conservative.

I had a hell of a time figuring out what NBPI meant --- the abbreviation 
is used *only* here, nowhere else in the manual or source:

~% grep -i nbpi  /usr/[Xlps][1hko]*/man/cat*/* | cut -d: -f1 | uniq -c | sort -n 
   1 /usr/share/man/cat5/fs.0
   1 /usr/share/man/cat5/inode.0


% pwd
/usr/src
% find . -type f -print | xargs grep -i nbpi
./share/man/man5/fs.5:.Dv NBPI
./share/man/tools/newsp.errs:NBPI
./share/man/tools/sp.ignore:NBPI
./sys/arch/amiga/dev/ite.c:             if (ib->pitch > MAXBPITCH || ib->pitch < MINBPITCH ||
./sys/arch/amiga/dev/iteioctl.h:#define MINBPITCH (10)
./sys/arch/atari/dev/iteioctl.h:#define MINBPITCH (10)
./sys/arch/vax/include/ka820.h:#define KA820PORT_ENBPIPE        0x00002000      /* enable? pipe */
./sys/arch/vax/include/ka820.h:\30WWPE\27EVLCK\26WMEM\25EV4\24EV3\23EV2\22EV1\21EV\20WWPO\17PERH\16ENBPIPE\
./sys/arch/x68k/dev/opmbell.c:    if (data->pitch > MAXBPITCH || data->pitch < MINBPITCH ||
./sys/arch/x68k/include/iteioctl.h:#define MINBPITCH (10)
./sys/arch/x68k/include/opmbellio.h:#define MINBPITCH   20

In contrast, the newfs(8) man page, which actually talks about setting
this parameter, refers to it without abbreviation, as "number of bytes
per inode".
	
>How-To-Repeat:
	
>Fix:
I suggest replacing the paragraph above in the inode(5)/fs(5) man page with:

     Each file system has a statically allocated number of inodes,
     determined by its size and the number of bytes per inode.  See
     newfs(8) for details on how to set this parameter.  The inode
     allocation strategy is extremely conservative.

---Alex

Carl Alexander
------------- MIT (where Alex hangs out):
xela@mit.edu      Course VI (sometime special student)    SIPB (prospective)
                  Mitgaard ("honorary mold")    MITSFS    LSC (night worker)
                  http://www.mit.edu/~xela
------------- Work (where they call me 'Carl'):
carl@terc.edu     System Administrator & User Services Manager, TERC
                  http://www.terc.edu
>Audit-Trail:
>Unformatted: