From owner-svn-src-all@FreeBSD.ORG Thu Oct 9 23:43:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4EDFC01; Thu, 9 Oct 2014 23:43:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0ABBE1F; Thu, 9 Oct 2014 23:43:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s99NhDQM085047; Thu, 9 Oct 2014 23:43:13 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NhDGI085046; Thu, 9 Oct 2014 23:43:13 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092343.s99NhDGI085046@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:43:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272867 - stable/10/sbin/dump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2014 23:43:13 -0000 Author: hrs Date: Thu Oct 9 23:43:13 2014 New Revision: 272867 URL: https://svnweb.freebsd.org/changeset/base/272867 Log: MFC r271411: Fix a bug which could break extended attributes in a dump output. This occurred when a file was >892kB long and had a large data (>1kB) in the extended attributes. Modified: stable/10/sbin/dump/traverse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dump/traverse.c ============================================================================== --- stable/10/sbin/dump/traverse.c Thu Oct 9 23:42:22 2014 (r272866) +++ stable/10/sbin/dump/traverse.c Thu Oct 9 23:43:13 2014 (r272867) @@ -673,7 +673,12 @@ ufs2_blksout(union dinode *dp, ufs2_dadd */ blks = howmany(frags * sblock->fs_fsize, TP_BSIZE); if (last) { - resid = howmany(fragoff(sblock, dp->dp2.di_size), TP_BSIZE); + if (writingextdata) + resid = howmany(fragoff(sblock, spcl.c_extsize), + TP_BSIZE); + else + resid = howmany(fragoff(sblock, dp->dp2.di_size), + TP_BSIZE); if (resid > 0) blks -= howmany(sblock->fs_fsize, TP_BSIZE) - resid; }