svn commit: r272867 - stable/10/sbin/dump

Hiroki Sato hrs at FreeBSD.org
Thu Oct 9 23:43:13 UTC 2014


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;
 	}


More information about the svn-src-all mailing list