Subject: bin/24723: makefs -s and blocksize
To: None <>
From: None <>
List: netbsd-bugs
Date: 03/09/2004 15:56:59
>Number:         24723
>Category:       bin
>Synopsis:       makefs -s and blocksize
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 09 21:58:00 UTC 2004
>Originator:     Bryan Cribbs
>Release:        NetBSD 1.6ZJ
System: NetBSD 1.6ZJ NetBSD 1.6ZJ (GENERIC.pcibios) #7: Fri Feb 20 20:24:13 CST 2004 i386
Architecture: i386
Machine: i386

If one uses the -s flag to makefs and specifies a size that is not 
evenly divisible by the blocksize, makefs is guaranteed to fail.

From checking out the source I found this happens because: 
  fsopts->minsize = fsopts->maxsize = arg to -s
and in the last steps of ffs_validate():
 - make sure size is at least minsize 
 - round up to the next block 
 - check that size is not greater then maxsize 

I'm not sure if this behaviour should be considered a bug.
At the least, the error message ("size of xxx greater than maxsize") 
is misleading in this case.



 $NetBSD: ffs.c,v 1.25 2003/10/26