Date: Sat, 3 May 2008 18:49:39 -0500 From: Scott Lambert <lambert@lambertfam.org> To: stable@freebsd.org Cc: David Malone <dwmalone@maths.tcd.ie>, Kirk McKusick <mckusick@mckusick.com> Subject: Re: restore issues "Header with wrong dumpdate." and "getfile: lost data" Message-ID: <20080503234939.GB68354@sysmon.tcworks.net> In-Reply-To: <200805032013.m43KD0qZ027534@chez.mckusick.com> References: <200805032013.m43KD0qZ027534@chez.mckusick.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <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: > > > 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 <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. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080503234939.GB68354>