diff options
author | phk <phk@FreeBSD.org> | 1997-10-16 10:50:27 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-10-16 10:50:27 +0000 |
commit | d166441755d9516e482ede0d988b7989be25b10a (patch) | |
tree | ad2fb706565dc877eddf12a6581bfa2467513503 /sys/ufs/lfs/lfs_inode.c | |
parent | efcfb5d9cd2ecb3d30ec4c7701bfe737dc1b4606 (diff) | |
download | FreeBSD-src-d166441755d9516e482ede0d988b7989be25b10a.zip FreeBSD-src-d166441755d9516e482ede0d988b7989be25b10a.tar.gz |
VFS mega cleanup commit (x/N)
1. Add new file "sys/kern/vfs_default.c" where default actions for
VOPs go. Implement proper defaults for ABORTOP, BWRITE, LEASE,
POLL, REVOKE and STRATEGY. Various stuff spread over the entire
tree belongs here.
2. Change VOP_BLKATOFF to a normal function in cd9660.
3. Kill VOP_BLKATOFF, VOP_TRUNCATE, VOP_VFREE, VOP_VALLOC. These
are private interface functions between UFS and the underlying
storage manager layer (FFS/LFS/MFS/EXT2FS). The functions now
live in struct ufsmount instead.
4. Remove a kludge of VOP_ functions in all filesystems, that did
nothing but obscure the simplicity and break the expandability.
If a filesystem doesn't implement VOP_FOO, it shouldn't have an
entry for it in its vnops table. The system will try to DTRT
if it is not implemented. There are still some cruft left, but
the bulk of it is done.
5. Fix another VCALL in vfs_cache.c (thanks Bruce!)
Diffstat (limited to 'sys/ufs/lfs/lfs_inode.c')
-rw-r--r-- | sys/ufs/lfs/lfs_inode.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/sys/ufs/lfs/lfs_inode.c b/sys/ufs/lfs/lfs_inode.c index 545c1df..6b03151 100644 --- a/sys/ufs/lfs/lfs_inode.c +++ b/sys/ufs/lfs/lfs_inode.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)lfs_inode.c 8.9 (Berkeley) 5/8/95 - * $Id: lfs_inode.c,v 1.17 1997/03/22 09:33:55 bde Exp $ + * $Id: lfs_inode.c,v 1.18 1997/09/02 20:06:48 bde Exp $ */ #include "opt_quota.h" @@ -154,20 +154,16 @@ lfs_update(ap) */ /* ARGSUSED */ int -lfs_truncate(ap) - struct vop_truncate_args /* { - struct vnode *a_vp; - off_t a_length; - int a_flags; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; +lfs_truncate(vp, length, flags, cred, p) + struct vnode *vp; + off_t length; + int flags; + struct ucred *cred; + struct proc *p; { register struct indir *inp; register int i; register ufs_daddr_t *daddrp; - register struct vnode *vp = ap->a_vp; - off_t length = ap->a_length; struct buf *bp, *sup_bp; struct timeval tv; struct ifile *ifp; @@ -378,7 +374,7 @@ lfs_truncate(ap) } #endif fs->lfs_avail += fragstodb(fs, a_released); - e1 = vinvalbuf(vp, (length > 0) ? V_SAVE : 0, ap->a_cred, ap->a_p, + e1 = vinvalbuf(vp, (length > 0) ? V_SAVE : 0, cred, p, 0, 0); e2 = VOP_UPDATE(vp, &tv, &tv, 0); return (e1 ? e1 : e2 ? e2 : 0); |