Date: Sat, 03 May 2008 13:13:00 -0700 From: Kirk McKusick <mckusick@mckusick.com> To: David Malone <dwmalone@maths.tcd.ie> Cc: stable@freebsd.org Subject: Re: restore issues "Header with wrong dumpdate." and "getfile: lost data" Message-ID: <200805032013.m43KD0qZ027534@chez.mckusick.com>
next in thread | raw e-mail | index | archive | help
> Date: Fri, 2 May 2008 15:33:03 +0100 > From: David Malone <dwmalone@maths.tcd.ie> > 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 <protocols/dumprestore.h> and <sys/extattr.h>. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805032013.m43KD0qZ027534>