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 <longw...@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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to