summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dump/traverse.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c
index 8258f07..8a9a378 100644
--- a/sbin/dump/traverse.c
+++ b/sbin/dump/traverse.c
@@ -673,7 +673,12 @@ ufs2_blksout(union dinode *dp, ufs2_daddr_t *blkp, int frags, ino_t ino,
*/
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;
}
OpenPOWER on IntegriCloud