Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Nov 2019 00:37:44 +0000 (UTC)
From:      Chuck Silvers <chs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355150 - head/sys/ufs/ffs
Message-ID:  <201911280037.xAS0biva057305@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: chs
Date: Thu Nov 28 00:37:43 2019
New Revision: 355150
URL: https://svnweb.freebsd.org/changeset/base/355150

Log:
  As part of creating a snapshot, set fs->fs_fmod to 0 in the snapshot image
  because nothing ever changes this field for read-only mounts and we want
  to verify that it is still 0 when we unmount.
  
  Reviewed by:	mckusick
  Approved by:	mckusick (mentor)
  Sponsored by:	Netflix

Modified:
  head/sys/ufs/ffs/ffs_snapshot.c

Modified: head/sys/ufs/ffs/ffs_snapshot.c
==============================================================================
--- head/sys/ufs/ffs/ffs_snapshot.c	Thu Nov 28 00:19:09 2019	(r355149)
+++ head/sys/ufs/ffs/ffs_snapshot.c	Thu Nov 28 00:37:43 2019	(r355150)
@@ -803,6 +803,7 @@ out1:
 		brelse(nbp);
 	} 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);
 		bawrite(nbp);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911280037.xAS0biva057305>