summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/ffs_balloc.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>1999-07-13 18:20:13 +0000
committermckusick <mckusick@FreeBSD.org>1999-07-13 18:20:13 +0000
commitf091c51c34a496d3062026be39d6948fa02b6c6e (patch)
tree7cab0e079bf7fb1610e4cb41564952dc7ee44c83 /sys/ufs/ffs/ffs_balloc.c
parent514e7c3963e88bf59518e2ba852c20fe7ca68df4 (diff)
downloadFreeBSD-src-f091c51c34a496d3062026be39d6948fa02b6c6e.zip
FreeBSD-src-f091c51c34a496d3062026be39d6948fa02b6c6e.tar.gz
Create the macro DOINGASYNC to check whether the MNT_ASYNC flag has
been set for a mount point. Insert missing checks to ensure that all write operations are done asynchronously when the MNT_ASYNC option has been requested. Submitted by: Craig A Soules <soules+@andrew.cmu.edu> Reviewed by: Kirk McKusick <mckusick@mckusick.com>
Diffstat (limited to 'sys/ufs/ffs/ffs_balloc.c')
-rw-r--r--sys/ufs/ffs/ffs_balloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c
index 2410b92..5b3df8b 100644
--- a/sys/ufs/ffs/ffs_balloc.c
+++ b/sys/ufs/ffs/ffs_balloc.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_balloc.c 8.8 (Berkeley) 6/16/95
- * $Id: ffs_balloc.c,v 1.21 1998/09/12 14:46:15 bde Exp $
+ * $Id: ffs_balloc.c,v 1.22 1999/01/28 00:57:54 dillon Exp $
*/
#include <sys/param.h>
@@ -216,7 +216,9 @@ ffs_balloc(ap)
* Write synchronously so that indirect blocks
* never point at garbage.
*/
- if ((error = bwrite(bp)) != 0)
+ if (DOINGASYNC(vp))
+ bdwrite(bp);
+ else if ((error = bwrite(bp)) != 0)
goto fail;
}
allocib = &ip->i_ib[indirs[0].in_off];
OpenPOWER on IntegriCloud