summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1995-11-06 03:21:41 +0000
committerdyson <dyson@FreeBSD.org>1995-11-06 03:21:41 +0000
commit61907789448ac434ff00c25354f3326ad69f2b80 (patch)
tree1109e4fd8a49886efc4ca0eaac02dc142760e14c /sys/ufs
parentf4abf27223541ec15599c00ffa14b9e09d934607 (diff)
downloadFreeBSD-src-61907789448ac434ff00c25354f3326ad69f2b80.zip
FreeBSD-src-61907789448ac434ff00c25354f3326ad69f2b80.tar.gz
This commit causes UFS to perform at Linux EXT2FS metadata rates. After
earlier discussions with DG, and a recent email exchange with SEF, I decided to allow UFS to run wide-open on an experimental basis. We will probably support eventually multiple async modes, and this is the fastest the we can expect. Just use the -o async flag on the UFS mount. Good luck...
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_lookup.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c
index 9020e47..82db282 100644
--- a/sys/ufs/ufs/ufs_lookup.c
+++ b/sys/ufs/ufs/ufs_lookup.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_lookup.c 8.6 (Berkeley) 4/1/94
- * $Id: ufs_lookup.c,v 1.6 1995/10/06 09:56:51 phk Exp $
+ * $Id: ufs_lookup.c,v 1.7 1995/10/22 09:32:45 davidg Exp $
*/
#include <sys/param.h>
@@ -773,7 +773,13 @@ ufs_direnter(ip, dvp, cnp)
ep = (struct direct *)((char *)ep + dsize);
}
bcopy((caddr_t)&newdir, (caddr_t)ep, (u_int)newentrysize);
- error = VOP_BWRITE(bp);
+
+ if (dvp->v_mount->mnt_flag & MNT_ASYNC) {
+ bdwrite(bp);
+ error = 0;
+ } else {
+ error = VOP_BWRITE(bp);
+ }
dp->i_flag |= IN_CHANGE | IN_UPDATE;
if (!error && dp->i_endoff && dp->i_endoff < dp->i_size)
error = VOP_TRUNCATE(dvp, (off_t)dp->i_endoff, IO_SYNC,
@@ -825,7 +831,12 @@ ufs_dirremove(dvp, cnp)
if (error)
return (error);
ep->d_reclen += dp->i_reclen;
- error = VOP_BWRITE(bp);
+ if (dvp->v_mount->mnt_flag & MNT_ASYNC) {
+ bdwrite(bp);
+ error = 0;
+ } else {
+ error = VOP_BWRITE(bp);
+ }
dp->i_flag |= IN_CHANGE | IN_UPDATE;
return (error);
}
@@ -851,7 +862,12 @@ ufs_dirrewrite(dp, ip, cnp)
ep->d_ino = ip->i_number;
if (!OFSFMT(vdp))
ep->d_type = IFTODT(ip->i_mode);
- error = VOP_BWRITE(bp);
+ if (vdp->v_mount->mnt_flag & MNT_ASYNC) {
+ bdwrite(bp);
+ error = 0;
+ } else {
+ error = VOP_BWRITE(bp);
+ }
dp->i_flag |= IN_CHANGE | IN_UPDATE;
return (error);
}
OpenPOWER on IntegriCloud