summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>2006-05-15 23:18:49 +0000
committertegge <tegge@FreeBSD.org>2006-05-15 23:18:49 +0000
commit82cbe05afeecd669d4a0af99fef0f3f4022521ff (patch)
treece5572a50a03d746695811ece521c182896d6d1b /sys/ufs/ffs
parentdd9e489c05b1caaec71746d3ce0fe2ec8f32555e (diff)
downloadFreeBSD-src-82cbe05afeecd669d4a0af99fef0f3f4022521ff.zip
FreeBSD-src-82cbe05afeecd669d4a0af99fef0f3f4022521ff.tar.gz
Copy last block on file system again after file system has been suspended.
Obtained from: NetBSD
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 0c011ea..3b1f99b 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -424,6 +424,17 @@ restart:
}
if (collectsnapstats)
nanotime(&starttime);
+
+ /* The last block might have changed. Copy it again to be sure. */
+ error = UFS_BALLOC(vp, lblktosize(fs, (off_t)(numblks - 1)),
+ fs->fs_bsize, KERNCRED, BA_CLRBUF, &bp);
+ if (error != 0)
+ goto out1;
+ error = readblock(vp, bp, numblks - 1);
+ bp->b_flags |= B_VALIDSUSPWRT;
+ bawrite(bp);
+ if (error != 0)
+ goto out1;
/*
* First, copy all the cylinder group maps that have changed.
*/
OpenPOWER on IntegriCloud