From owner-freebsd-bugs Tue Feb 10 10:30:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA15717 for freebsd-bugs-outgoing; Tue, 10 Feb 1998 10:30:02 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA15685; Tue, 10 Feb 1998 10:30:01 -0800 (PST) (envelope-from gnats) Received: from salmon.maths.tcd.ie (mmdf@salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id KAA15538 for ; Tue, 10 Feb 1998 10:29:05 -0800 (PST) (envelope-from dwmalone@maths.tcd.ie) Received: from synge.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 10 Feb 98 18:28:54 +0000 (GMT) Message-Id: <9802101828.aa06956@synge.maths.tcd.ie> Date: Tue, 10 Feb 98 18:28:53 +0000 (GMT) From: dwmalone@maths.tcd.ie Reply-To: dwmalone@maths.tcd.ie To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/5704: restore coredumps on filesystems with small blocksizes Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 5704 >Category: bin >Synopsis: restore coredumps on filesystems with small blocksizes >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 10 10:30:00 PST 1998 >Last-Modified: >Originator: David Malone >Organization: School of Mathematics, Trinity College Dublin, Ireland. >Release: FreeBSD 2.2.5-STABLE i386 >Environment: If you run restore with cwd on an nfs3 filesystem (say) where the blocksize is less than 1024, restore will give a bus error. >Description: The logic in tape.c:getfile() doesn't allow for a filesystem with a blocksize smaller than the tape block size. The problem seems to be most easily fixed by changeing where fssize is set. >How-To-Repeat: cd /nfs3 cat dump | restore ivbf 2 - >Fix: This diff changes the setting of fssize, so that if the filesystem blocksize is too small it is set to the minimum (TP_BSIZE), otherwise the logic is as before. --- /usr/src/sbin/restore/tape.c Thu Jan 29 22:26:11 1998 +++ tape.c Tue Feb 10 18:17:31 1998 @@ -231,7 +231,9 @@ fprintf(stderr, "cannot stat .: %s\n", strerror(errno)); done(1); } - if (stbuf.st_blksize > 0 && stbuf.st_blksize <= MAXBSIZE) + if (stbuf.st_blksize > 0 && stbuf.st_blksize < TP_BSIZE ) + fssize = TP_BSIZE; + if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE) fssize = stbuf.st_blksize; if (((fssize - 1) & fssize) != 0) { fprintf(stderr, "bad block size %d\n", fssize); >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message