Author: mckusick
Date: Mon Aug  7 02:29:09 2017
New Revision: 322132
URL: https://svnweb.freebsd.org/changeset/base/322132

Log:
  MFC r321816:
  Avoid reading a snapshot block when it is already in the cache.

Modified:
  stable/10/sys/ufs/ffs/ffs_snapshot.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/ufs/ffs/ffs_snapshot.c
==============================================================================
--- stable/10/sys/ufs/ffs/ffs_snapshot.c        Mon Aug  7 02:23:34 2017        
(r322131)
+++ stable/10/sys/ufs/ffs/ffs_snapshot.c        Mon Aug  7 02:29:09 2017        
(r322132)
@@ -1403,7 +1403,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);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to