Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Nov 2003 10:22:24 +0100 (CET)
From:      vpaepcke@dssgmbh.de
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        vpaepcke@Incore.DE
Subject:   bin/58912: dump fails on big directories with nodump flag set
Message-ID:  <200311040922.hA49MOil001182@uxpae.incore>
Resent-Message-ID: <200311040930.hA49UJ3s034859@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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 <vpaepcke@incore.de>
>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311040922.hA49MOil001182>