summaryrefslogtreecommitdiff
path: root/sys/msdosfs/msdosfs_vfsops.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-27 05:27:13 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-27 05:27:13 +0000
commit8a1845e49f56720cbfccd4c7f5f80ba5b980fdf4 (patch)
treed4a522dc41cdc79ba48fe761e94663b795da8cc0 /sys/msdosfs/msdosfs_vfsops.c
parent0d68e9b5af14f4bfa04d22dbebab5972ac647b26 (diff)
Merge in the unified buffer cache code as found in NetBSD 2001/03/10. The
code is written mostly by Chuck Silvers <chuq@chuq.com>/<chs@netbsd.org>. Tested for the past few weeks by many developers, should be in a pretty stable state, but will require optimizations and additional cleanups.
Diffstat (limited to 'sys/msdosfs/msdosfs_vfsops.c')
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index fec59174189..63175e08754 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vfsops.c,v 1.25 2001/11/21 21:37:01 csapuntz Exp $ */
+/* $OpenBSD: msdosfs_vfsops.c,v 1.26 2001/11/27 05:27:12 art Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
/*-
@@ -584,15 +584,9 @@ msdosfs_mountfs(devvp, mp, p, argp)
mp->mnt_data = (qaddr_t)pmp;
mp->mnt_stat.f_fsid.val[0] = (long)dev;
mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
-#ifdef QUOTA
- /*
- * If we ever do quotas for DOS filesystems this would be a place
- * to fill in the info in the msdosfsmount structure. You dolt,
- * quotas on dos filesystems make no sense because files have no
- * owners on dos filesystems. of course there is some empty space
- * in the directory entry where we could put uid's and gid's.
- */
-#endif
+ mp->mnt_dev_bshift = pmp->pm_bnshift;
+ mp->mnt_fs_bshift = pmp->pm_cnshift;
+
devvp->v_specmountpoint = mp;
return (0);
@@ -720,10 +714,11 @@ msdosfs_sync_vnode(struct vnode *vp, void *arg)
struct denode *dep;
dep = VTODE(vp);
- if (vp->v_type == VNON ||
- ((dep->de_flag & (DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0
- && vp->v_dirtyblkhd.lh_first == NULL) ||
- msa->waitfor == MNT_LAZY) {
+ if (msa->waitfor == MNT_LAZY || vp->v_type == VNON ||
+ (((dep->de_flag &
+ (DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0) &&
+ (LIST_EMPTY(&vp->v_dirtyblkhd) &&
+ vp->v_uvm.u_obj.uo_npages == 0))) {
simple_unlock(&vp->v_interlock);
return (0);
}