Bug 30959

Summary: newfs -i x dumps core for small values of x
Product: Base System Reporter: setantae <setantae>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-STABLE   
Hardware: Any   
OS: Any   

Description setantae 2001-10-01 16:20:02 UTC
	Calling newfs with the -i option where the value passed is < 256
	causes newfs to dump core, or otherwise misbehave.

Fix: 

Create less inodes than you want by using values >= 256.
How-To-Repeat: 
< 128 :
	root@rhadamanth setantae# newfs -b 8192 -f 1024 -i64 /dev/ad2s2e
	Floating point exception (core dumped)
	root@rhadamanth setantae#

(this core dump is available if you want it)

< 256 :

	root@rhadamanth setantae# newfs -b 8192 -f 1024 -i128 /dev/ad2s2e
	/dev/ad2s2e:    65536 sectors in 16 cylinders of 1 tracks, 4096 sectors
	        32.0MB in 1 cyl groups (16 c/g, 32.00MB/g, 0 i/g)
	super-block backups (for fsck -b #) at:
	 32
	fsinit: inode value out of range (2).
	root@rhadamanth setantae#
Comment 1 setantae 2001-10-30 17:18:09 UTC
The above mentioned coredump is now available here:
http://dogma.freebsd-uk.eu.org/~setantae/FreeBSD/pr/30959/

Ceri
Comment 2 Kirk McKusick freebsd_committer freebsd_triage 2002-11-30 18:32:51 UTC
State Changed
From-To: open->closed