Subject: Re: toolchain/33925: makefs(8) incorrect calculation of required
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Thorsten Glaser <tg@mirbsd.de>
List: netbsd-bugs
Date: 08/19/2006 13:35:03
The following reply was made to PR toolchain/33925; it has been noted by GNATS.
From: Thorsten Glaser <tg@mirbsd.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/33925: makefs(8) incorrect calculation of required
image size
Date: Sat, 19 Aug 2006 13:22:17 +0000 (UTC)
Hello all,
two more cases: one display of another failure under MirBSD (trying to
pack as much as possible on a floppy after shrinking the bootloader by
another few bytes; if it's any bigger it fails correctly; I don't know
whether this should somehow fit or not, seems there is some problem at
the last block (which is apparently not fragmented)), which is related
to the original problem:
sudo makefs -s 2880b -o minfree=0,optimization=space,bsize=4096,fsize=512 floppy9.fs /usr/obj/distrib/common/tmpdata
Calculated size of `floppy9.fs': 1474560 bytes, 4 inodes
Extent size set to 4096
floppy9.fs: 1.4MB (2880 sectors) block size 4096, fragment size 512
using 1 cylinder groups of 1.41MB, 360 blks, 32 inodes.
super-block backups (for fsck -b #) at:
32,makefs: Writing inode 4 (/usr/obj/distrib/common/tmpdata/bsd), bytes 1400832 + 4096: No space left on device
Populating `floppy9.fs'
*** Error code 1
Stop in /usr/src/distrib/common (line 166 of /usr/src/distrib/common/Makefile).
Additional information:
-rwxr-xr-x 1 root wheel 35280 Aug 19 13:06 tmpdata/boot
-rw-r--r-- 1 root wheel 1415326 Aug 19 13:06 tmpdata/bsd
I tarred up the data, in case one of you wants to verify it fixes
that too: http://www.mirbsd.org/GBG/pr33925-att1.tgz
And the other case: I got an account on a NetBSD(R) system and used it
to reproduce the issue:
$ uname -a; rm -rf tdir x; mkdir tdir; dd if=/dev/urandom of=tdir/test count=32; /usr/sbin/makefs x tdir
NetBSD ip54532528.speed.planet.nl 3.0_STABLE NetBSD 3.0_STABLE (GENERIC) #0: Wed Jan 11 19:40:54 UTC 2006 netbsdbuilder@draco.osr.netphreax.net:/stor/builds/netbsd/netbsd-3/src/sys/arch/i386/compile/obj/GENERIC i386
32+0 records in
32+0 records out
16384 bytes transferred in 0.095 secs (172463 bytes/sec)
Calculated size of `x': 49152 bytes, 3 inodes
Extent size set to 8192
x: 0.0MB (96 sectors) block size 8192, fragment size 1024
using 1 cylinder groups of 0.05MB, 6 blks, 64 inodes.
super-block backups (for fsck -b #) at:
32,
Populating `x'
makefs: Writing inode 3 (tdir/test), bytes 0 + 8192: No space left on device
So this bug happens for you too, which might raise the priority ;)
bye,
//mirabile
PS: Thanks to TGEN for providing me with that shell account.
--
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence. -- Coywolf Qi Hunt