NetBSD Problem Report #33925

From www@NetBSD.org  Thu Jul  6 00:18:33 2006
Return-Path: <www@NetBSD.org>
Received: by narn.NetBSD.org (Postfix, from userid 31301)
	id C191163B8C5; Thu,  6 Jul 2006 00:18:33 +0000 (UTC)
Message-Id: <20060706001833.C191163B8C5@narn.NetBSD.org>
Date: Thu,  6 Jul 2006 00:18:33 +0000 (UTC)
From: tg@mirbsd.org
Reply-To: tg@mirbsd.org
To: gnats-bugs@NetBSD.org
Subject: feature request: makefs(8) should output blocks used by each file
X-Send-Pr-Version: www-1.0

>Number:         33925
>Category:       toolchain
>Synopsis:       incorrect calculation of required image size
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 06 00:20:03 +0000 2006
>Last-Modified:  Sat Aug 19 13:35:01 +0000 2006
>Originator:     Thorsten Glaser
>Release:        code from cvs -rHEAD
>Organization:
MirOS Project
>Environment:
MirBSD odem.66h.42h.de 9 Kv#9s81-stable-20060701 GENERIC#923 i386
>Description:
When not specifying file system size,
writes are failing due to lack of space.

IMHO makefs always ought to build the
filesystem as small as possible, that's
why I don't want to "fix" it with a
simple "numblocks+=1;" somewhere in
the code.
>How-To-Repeat:
tg@odem:~ $ rm -rf testdir x;mkdir testdir; dd if=/dev/arandom of=testdir/test count=32; makefs x testdir
32+0 records in
32+0 records out
16384 bytes transferred in 0.001 secs (10291457 bytes/sec)
Calculated size of : 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 
makefs: Writing inode 3 (testdir/test), bytes 0 + 8192: No space left on device
>Fix:

>Release-Note:

>Audit-Trail:
From: Thorsten Glaser <tg@mirbsd.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/33925: feature request: makefs(8) should output blocks
 used by each file
Date: Thu, 6 Jul 2006 00:22:56 +0000 (UTC)

 gnats-admin@NetBSD.org dixit:

 >>Synopsis:       feature request: makefs(8) should output blocks used by each file

 Oops, this Synopsis is wrong, my bad for reusing the web form.
 Please correct this to:

 >Synopsis:	incorrect calculation of required image size

 //mirabile
 -- 
 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

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.