Subject: bin/24723: makefs -s and blocksize
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <bdcribbs@ojctech.com>
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
>Closed-Date:
>Last-Modified:
>Originator: Bryan Cribbs
>Release: NetBSD 1.6ZJ
>Organization:
>Environment:
System: NetBSD cuw.ojctech.com 1.6ZJ NetBSD 1.6ZJ (GENERIC.pcibios) #7: Fri Feb 20 20:24:13 CST 2004 dyoung@cuw.ojctech.com:/u1/dyoung/pristine-nbsd/O/sys/arch/i386/compile/GENERIC.pcibios i386
Architecture: i386
Machine: i386
>Description:
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.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
$NetBSD: ffs.c,v 1.25 2003/10/26