Author: mckusick
Date: Fri Feb 23 21:57:10 2018
New Revision: 329880
URL: https://svnweb.freebsd.org/changeset/base/329880

Log:
  Include error number in the "fsync: giving up on dirty" message
  (in case it ever starts happening again in spite of 328444).
  
  Submitted by: Andreas Longwitz <longwitz at incore.de>

Modified:
  head/sys/kern/vfs_default.c

Modified: head/sys/kern/vfs_default.c
==============================================================================
--- head/sys/kern/vfs_default.c Fri Feb 23 20:18:09 2018        (r329879)
+++ head/sys/kern/vfs_default.c Fri Feb 23 21:57:10 2018        (r329880)
@@ -714,12 +714,13 @@ loop2:
                        if ((mp != NULL && mp->mnt_secondary_writes > 0) ||
                            (error == 0 && --maxretry >= 0))
                                goto loop1;
-                       error = EAGAIN;
+                       if (error == 0)
+                               error = EAGAIN;
                }
        }
        BO_UNLOCK(bo);
-       if (error == EAGAIN)
-               vn_printf(vp, "fsync: giving up on dirty ");
+       if (error != 0)
+               vn_printf(vp, "fsync: giving up on dirty (error = %d) ", error);
 
        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