From cfa6fda2522d5851cab5f536a80741f4a5163c2c Mon Sep 17 00:00:00 2001 From: dyson Date: Sun, 5 Nov 1995 21:01:15 +0000 Subject: Make MNT_ASYNC more effective for UFS. It should not be too much more dangerous than the original MNT_ASYNC. There might be some minor security considerations due to data writes not being posted as promptly as before. Meta-data operations are still not quite as fast as Linux, but streaming I/O is still higher. --- sys/ufs/ffs/ffs_inode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/ufs/ffs/ffs_inode.c') diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 1b8d25c..3b5f56f 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_inode.c 8.5 (Berkeley) 12/30/93 - * $Id: ffs_inode.c,v 1.14 1995/08/04 05:49:17 davidg Exp $ + * $Id: ffs_inode.c,v 1.15 1995/08/16 13:16:58 davidg Exp $ */ #include @@ -222,6 +222,8 @@ ffs_truncate(ap) oip->i_size = length; if (aflags & B_SYNC) bwrite(bp); + else if (ovp->v_mount->mnt_flag & MNT_ASYNC) + bdwrite(bp); else bawrite(bp); vnode_pager_setsize(ovp, (u_long)length); @@ -252,6 +254,8 @@ ffs_truncate(ap) allocbuf(bp, size); if (aflags & B_SYNC) bwrite(bp); + else if (ovp->v_mount->mnt_flag & MNT_ASYNC) + bdwrite(bp); else bawrite(bp); } -- cgit v1.1