From owner-cvs-src@FreeBSD.ORG Thu May 22 22:19:33 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C1CC1065671; Thu, 22 May 2008 22:19:33 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4BEA28FC16; Thu, 22 May 2008 22:19:33 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4MMJXfp084946; Thu, 22 May 2008 22:19:33 GMT (envelope-from mckusick@repoman.freebsd.org) Received: (from mckusick@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4MMJXO7084945; Thu, 22 May 2008 22:19:33 GMT (envelope-from mckusick) Message-Id: <200805222219.m4MMJXO7084945@repoman.freebsd.org> From: Kirk McKusick Date: Thu, 22 May 2008 22:19:33 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sbin/restore tape.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2008 22:19:33 -0000 mckusick 2008-05-22 22:19:33 UTC FreeBSD src repository Modified files: sbin/restore tape.c Log: This fixes the "getfile: lost data" panic when restoring dumps on a 7.0 or later system that were created on a pre-5.0 system. We must ensure that restore zeros out the previously undefined birthtime and external attribute size fields when reading dump tapes made by the UFS1 dump program. The problem is that UFS2 dump carefully zeros out the unused birthtime and external attribute size fields in the dump header when dumping UFS1 filesystems, but the UFS1 dump didn't know about those fields (they were spares) so just left whatever random junk was in them. So, when restoring one of these pre-UFS2 dumps, the new restore would eventually trip across a header that had a non-zero external attribute size and try to extract it. That consumed several tape blocks which left it totally out of sync and very unhappy (i.e., the panic). The fix is in the gethead() function which modernizes old headers by copying old fields to their new location (and with this fix) zeroing out previously undefined fields. PR: bin/120881 Review by: David Malone & Scott Lambert MFC after: 1 week Revision Changes Path 1.53 +3 -0 src/sbin/restore/tape.c