aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 709038db071f..a23f0ad502a9 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -207,7 +207,7 @@ ffs_snapshot(struct mount *mp, char *snapfile)
long snaplistsize = 0;
int32_t *lp;
void *space;
- struct fs *copy_fs = NULL, *fs;
+ struct fs *copy_fs = NULL, *fs, *bpfs;
struct thread *td = curthread;
struct inode *ip, *xp;
struct buf *bp, *nbp, *ibp;
@@ -828,8 +828,10 @@ resumefs:
} else {
loc = blkoff(fs, fs->fs_sblockloc);
copy_fs->fs_fmod = 0;
- copy_fs->fs_ckhash = ffs_calc_sbhash(copy_fs);
- bcopy((char *)copy_fs, &nbp->b_data[loc], (u_int)fs->fs_sbsize);
+ bpfs = (struct fs *)&nbp->b_data[loc];
+ bcopy((caddr_t)copy_fs, (caddr_t)bpfs, (u_int)fs->fs_sbsize);
+ ffs_oldfscompat_write(bpfs, ump);
+ bpfs->fs_ckhash = ffs_calc_sbhash(bpfs);
bawrite(nbp);
}
/*