From owner-freebsd-stable@FreeBSD.ORG Sat May 3 20:36:27 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 0AA9F106566C for ; Sat, 3 May 2008 20:36:27 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [64.81.247.49]) by mx1.freebsd.org (Postfix) with ESMTP id AA8BD8FC13 for ; Sat, 3 May 2008 20:36:26 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost.mckusick.com [127.0.0.1]) by chez.mckusick.com (8.13.8/8.13.8) with ESMTP id m43KD0qZ027534; Sat, 3 May 2008 13:13:01 -0700 (PDT) (envelope-from mckusick@chez.mckusick.com) Message-Id: <200805032013.m43KD0qZ027534@chez.mckusick.com> To: David Malone Date: Sat, 03 May 2008 13:13:00 -0700 From: Kirk McKusick Cc: stable@freebsd.org 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 20:36:27 -0000 > 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: > > I've seen http://www.freebsd.org/cgi/query-pr.cgi?pr=120881 which > > seems to apply to the "getfile: lost data" lines. There is also > > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=bin/118087 which seems to > > apply to "Header with wrong dumpdate." > > I believe these are basically harmless. I don't know if Kirk plans > to merge the fix, but I can do it if he wants. I put in the fix for "Header with wrong dumpdate" when I came across it. I never realized that there was an outstanding PR. I am happy to have you MFC the fix and close the PR with an appropriate note that it has been fixed. > > 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? > > David. 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. Kirk McKusick