svn commit: r321816 - head/sys/ufs/ffs

Kirk McKusick mckusick at FreeBSD.org
Mon Jul 31 20:41:47 UTC 2017


Author: mckusick
Date: Mon Jul 31 20:41:45 2017
New Revision: 321816
URL: https://svnweb.freebsd.org/changeset/base/321816

Log:
  Avoid reading a snapshot block when it is already in the cache.
  Update the use of the B_CACHE flag (since the May 1999 commit
  that made it the correct test here).
  
  Reported by: Andreas Longwitz <longwitz at incore.de>
  Reviewed by: kib
  Tested by: Peter Holm
  MFC after: 1 week

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

Modified: head/sys/ufs/ffs/ffs_snapshot.c
==============================================================================
--- head/sys/ufs/ffs/ffs_snapshot.c	Mon Jul 31 20:28:26 2017	(r321815)
+++ head/sys/ufs/ffs/ffs_snapshot.c	Mon Jul 31 20:41:45 2017	(r321816)
@@ -1394,7 +1394,7 @@ indiracct_ufs2(snapvp, cancelvp, level, blkno, lbn, rl
 	 */
 	bp = getblk(cancelvp, lbn, fs->fs_bsize, 0, 0, 0);
 	bp->b_blkno = fsbtodb(fs, blkno);
-	if ((bp->b_flags & (B_DONE | B_DELWRI)) == 0 &&
+	if ((bp->b_flags & B_CACHE) == 0 &&
 	    (error = readblock(cancelvp, bp, fragstoblks(fs, blkno)))) {
 		brelse(bp);
 		return (error);


More information about the svn-src-head mailing list