Author: kib
Date: Tue Jan  9 10:33:11 2018
New Revision: 327721
URL: https://svnweb.freebsd.org/changeset/base/327721

Log:
  Postpone the disassotiation of the background write buffer with devvp
  so that buf_complete() sees fully constructed buffer.
  
  This is a NOP right now, but will be needed by the forthcoming SU change.
  
  Reported and tested by:       pho
  Reviewed by:  mckusick
  Sponsored by: The FreeBSD Foundation
  MFC after:    1 week

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

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- head/sys/ufs/ffs/ffs_vfsops.c       Tue Jan  9 09:26:16 2018        
(r327720)
+++ head/sys/ufs/ffs/ffs_vfsops.c       Tue Jan  9 10:33:11 2018        
(r327721)
@@ -2045,7 +2045,6 @@ ffs_backgroundwritedone(struct buf *bp)
        /*
         * Process dependencies then return any unfinished ones.
         */
-       pbrelvp(bp);
        if (!LIST_EMPTY(&bp->b_dep) && (bp->b_ioflags & BIO_ERROR) == 0)
                buf_complete(bp);
 #ifdef SOFTUPDATES
@@ -2058,6 +2057,7 @@ ffs_backgroundwritedone(struct buf *bp)
         */
        bp->b_flags |= B_NOCACHE;
        bp->b_flags &= ~B_CACHE;
+       pbrelvp(bp);
 
        /*
         * Prevent brelse() from trying to keep and re-dirtying bp on
_______________________________________________
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