From owner-freebsd-bugs@FreeBSD.ORG Tue Nov 4 01:30:22 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA7B116A4CE for ; Tue, 4 Nov 2003 01:30:21 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B95543FE9 for ; Tue, 4 Nov 2003 01:30:19 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hA49UJFY034861 for ; Tue, 4 Nov 2003 01:30:19 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hA49UJ3s034859; Tue, 4 Nov 2003 01:30:19 -0800 (PST) (envelope-from gnats) Resent-Date: Tue, 4 Nov 2003 01:30:19 -0800 (PST) Resent-Message-Id: <200311040930.hA49UJ3s034859@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, vpaepcke@dssgmbh.de Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B274C16A4CF for ; Tue, 4 Nov 2003 01:22:28 -0800 (PST) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA25643F85 for ; Tue, 4 Nov 2003 01:22:26 -0800 (PST) (envelope-from scratchy@Incore.DE) Received: from imap.incore (imap [192.168.0.64]) by dss.incore.de (8.11.6/8.9.3) with ESMTP id hA49MY504269 for ; Tue, 4 Nov 2003 10:22:34 +0100 Received: from uxpae.incore (uxpae.incore [192.168.0.69]) by imap.incore (Postfix on SuSE eMail Server 2.0) with ESMTP id 1A2F9639B7; Tue, 4 Nov 2003 10:22:34 +0100 (CET) Received: from uxpae.incore (localhost [127.0.0.1]) by uxpae.incore (8.12.9/8.12.9) with ESMTP id hA49MOd4001183; Tue, 4 Nov 2003 10:22:24 +0100 (CET) (envelope-from scratchy@uxpae.incore) Received: (from scratchy@localhost) by uxpae.incore (8.12.9/8.12.9/Submit) id hA49MOil001182; Tue, 4 Nov 2003 10:22:24 +0100 (CET) (envelope-from scratchy) Message-Id: <200311040922.hA49MOil001182@uxpae.incore> Date: Tue, 4 Nov 2003 10:22:24 +0100 (CET) From: vpaepcke@dssgmbh.de To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: vpaepcke@Incore.DE Subject: bin/58912: dump fails on big directories with nodump flag set X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vpaepcke@dssgmbh.de List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2003 09:30:22 -0000 >Number: 58912 >Category: bin >Synopsis: dump fails on big directories with nodump flag set >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Nov 04 01:30:18 PST 2003 >Closed-Date: >Last-Modified: >Originator: Volker Paepcke >Release: FreeBSD 4.9-PRERELEASE i386 >Organization: DSS Incore-Service GmbH - http//www.incore.de >Environment: System: FreeBSD uxpae.incore 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #2: Sat Sep 6 13:17:54 CEST 2003 root@uxpae.incore:/ad0/opt/obj/usr/src/sys/UXPAE i386 All stable and current versions are affected by this error! >Description: Dump doesn't propagate the nodump flag on big directories correctly. Only the entries contained in the first block are propagated. All further entries are simply skipped and may be dumped despite the nodump flag. >How-To-Repeat: Create a directory with a size bigger than one block. Set the nodump flag on this directory and backup the filesystem containing this directory. >Fix: There is a bug in /usr/src/sbin/dump/traverse.c: The inode buffer referenced by dp may change during the the call to searchdir() and may not be used thereafter. The inode buffer di containing a copy of the original one must be used instead. *** /usr/src/sbin/dump/traverse.c.1st Sat Aug 30 12:33:03 2003 --- /usr/src/sbin/dump/traverse.c Tue Nov 4 09:46:43 2003 *************** *** 232,238 **** for (ret = 0, i = 0; filesize > 0 && i < NDADDR; i++) { if (di.di_db[i] != 0) ret |= searchdir(ino, di.di_db[i], ! (long)dblksize(sblock, dp, i), filesize, tapesize, nodump); if (ret & HASDUMPEDFILE) filesize = 0; --- 232,238 ---- for (ret = 0, i = 0; filesize > 0 && i < NDADDR; i++) { if (di.di_db[i] != 0) ret |= searchdir(ino, di.di_db[i], ! (long)dblksize(sblock, &di, i), filesize, tapesize, nodump); if (ret & HASDUMPEDFILE) filesize = 0; >Release-Note: >Audit-Trail: >Unformatted: