From owner-freebsd-stable@FreeBSD.ORG Sat May 3 23:49:47 2008 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B8161065670 for ; Sat, 3 May 2008 23:49:47 +0000 (UTC) (envelope-from lambert@lambertfam.org) Received: from sysmon.tcworks.net (sysmon.tcworks.net [65.66.76.4]) by mx1.freebsd.org (Postfix) with ESMTP id D9A118FC17 for ; Sat, 3 May 2008 23:49:46 +0000 (UTC) (envelope-from lambert@lambertfam.org) Received: from sysmon.tcworks.net (localhost [127.0.0.1]) by sysmon.tcworks.net (8.13.1/8.13.1) with ESMTP id m43NnefY008230; Sat, 3 May 2008 18:49:45 -0500 (CDT) (envelope-from lambert@lambertfam.org) Received: (from lambert@localhost) by sysmon.tcworks.net (8.13.1/8.13.1/Submit) id m43NndTq008229; Sat, 3 May 2008 18:49:39 -0500 (CDT) (envelope-from lambert@lambertfam.org) X-Authentication-Warning: sysmon.tcworks.net: lambert set sender to lambert@lambertfam.org using -f Date: Sat, 3 May 2008 18:49:39 -0500 From: Scott Lambert To: stable@freebsd.org Message-ID: <20080503234939.GB68354@sysmon.tcworks.net> Mail-Followup-To: stable@freebsd.org, David Malone , Kirk McKusick References: <200805032013.m43KD0qZ027534@chez.mckusick.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200805032013.m43KD0qZ027534@chez.mckusick.com> User-Agent: Mutt/1.4.2.2i Cc: David Malone , Kirk McKusick Subject: Re: restore issues "Header with wrong dumpdate." and "getfile: lost data" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2008 23:49:47 -0000 On Sat, May 03, 2008 at 01:13:00PM -0700, Kirk McKusick wrote: > > Date: Fri, 2 May 2008 15:33:03 +0100 > > From: David Malone > > To: stable@freebsd.org > > Cc: mckusick@mckusick.com > > Subject: Re: restore issues "Header with wrong dumpdate." and "getfile: lost data" > > > > On Thu, May 01, 2008 at 03:52:14PM -0500, Scott Lambert wrote: > > > 120881 seems not to have been applied to CVS just yet. > > > > Ah - I'd missed 120881. This seems to relate to a more recent change > > of Kirk's. Kirk - do you want to look at: > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=120881 > > > > or would you prefer if I had a look at it? > > I have taken a look at it and can make the following observations > on the proposed fix: > > It seems that the culprit is the following sequence in tape.c > if (curblk > 0) > panic("getfile: lost data\n"); > This was introduced in version 1.48 > Version 1.44.2.1 of tape.c shipped with FreeBSD 6.2 has a different > handler: > if (curblk > 0) > (*fill)((char *)buf, (long)((curblk * TP_BSIZE) + size)); > which doesn't panic. > > The 1.48 change added support for restoring extended attributes. > This change was never MFC'ed to FreeBSD 6 as it required updates > of and . There was concern > that too many folks would get compile errors in `make world' and not > understand what needed to be done to fix them. So the > if (curblk > 0) > (*fill)((char *)buf, (long)((curblk * TP_BSIZE) + size)); > code in 1.44.2.1 is correct for that version of restore because it > does not support extended attributes. I put the panic in for 1.48 > because I believed that I would always have skipped over any extra > blocks at the end of a file (or extended attribute) and thus there > should never have been any left. Obviously, I missed some case :-( > So, while the proposed fix does get rid of the panic, my concern is > that it will instead put some spurious data at the end of a file or > extended attribute. Ideally, I would like to get a copy of the dump > (or really just the first part of it needed to reproduce the problem) > so that I can analyze it to figure out what I am doing wrong. I have had the problem with dumps made on any of my FreeBSD 4.x systems. If you don't still have a 4.x system laying around, I can send you a link to a test dump. -- Scott Lambert KC5MLE Unix SysAdmin lambert@lambertfam.org