From owner-freebsd-bugs Sun Oct 13 14:50:04 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA07687 for bugs-outgoing; Sun, 13 Oct 1996 14:50:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA07681; Sun, 13 Oct 1996 14:50:02 -0700 (PDT) Resent-Date: Sun, 13 Oct 1996 14:50:02 -0700 (PDT) Resent-Message-Id: <199610132150.OAA07681@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, tegge@itea.ntnu.no Received: from istind.itea.unit.no (istind.itea.unit.no [129.241.190.12]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA07623 for ; Sun, 13 Oct 1996 14:48:23 -0700 (PDT) Received: from skarven.itea.ntnu.no (tegge@skarven.itea.ntnu.no [129.241.190.13]) by istind.itea.unit.no (8.6.12/1.9.AHJ) with ESMTP id VAA25572 for ; Sun, 13 Oct 1996 21:48:10 GMT Received: (from tegge@localhost) by skarven.itea.ntnu.no (8.7.6/8.7.3) id XAA02104; Sun, 13 Oct 1996 23:48:09 +0200 (MET DST) Message-Id: <199610132148.XAA02104@skarven.itea.ntnu.no> Date: Sun, 13 Oct 1996 23:48:09 +0200 (MET DST) From: Tor Egge Reply-To: tegge@itea.ntnu.no To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/1789: dump estimates a negative number of tapes needed for huge dumps Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1789 >Category: bin >Synopsis: dump estimates a negative number of tapes needed for huge dumps >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 13 14:50:01 PDT 1996 >Last-Modified: >Originator: Tor Egge >Organization: Norwegian University of Science and Technology, Trondheim, Norway >Release: FreeBSD 2.2-CURRENT i386 >Environment: FreeBSD skarven.itea.ntnu.no 2.2-CURRENT FreeBSD 2.2-CURRENT #0: Fri Oct 11 23:58:42 1996 root@skarven.itea.ntnu.no:/usr/src/sys/compile/SKARVEN i386 >Description: skarven# df -k /export/ftpsearch1 Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/sd2a 4175707 3352892 697544 83% /export/ftpsearch1 skarven# dump 0f /dev/null /dev/rsd2a DUMP: Date of this level 0 dump: Sun Oct 13 23:16:13 1996 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/rsd2a (/export/ftpsearch1) to /dev/null DUMP: mapping (Pass I) [regular files] DUMP: mapping (Pass II) [directories] DUMP: estimated 3355778 tape blocks on -10.93 tape(s). DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] [...] >How-To-Repeat: dump a big filesystem (more than 2 GB used). >Fix: cast tapesize to double in the expression that calculates fetapes to avoid wraparound. Index: main.c =================================================================== RCS file: /export/ftpsearch3/cvs/src/sbin/dump/main.c,v retrieving revision 1.7 diff -u -r1.7 main.c --- main.c 1996/09/14 02:57:39 1.7 +++ main.c 1996/10/13 21:40:12 @@ -368,7 +368,7 @@ Assume no erroneous blocks; this can be compensated for with an artificially low tape size. */ fetapes = - ( tapesize /* blocks */ + ( (double) tapesize /* blocks */ * TP_BSIZE /* bytes/block */ * (1.0/density) /* 0.1" / byte " */ + @@ -381,7 +381,7 @@ tape */ int tenthsperirg = (density == 625) ? 3 : 7; fetapes = - ( tapesize /* blocks */ + ( (double) tapesize /* blocks */ * TP_BSIZE /* bytes / block */ * (1.0/density) /* 0.1" / byte " */ + >Audit-Trail: >Unformatted: