diff options
Diffstat (limited to 'sys/gnu/fs/ext2fs')
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_alloc.c | 2 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_extern.h | 2 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_inode.c | 31 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_mount.h | 4 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_readwrite.c | 2 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 1 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vnops.c | 5 |
7 files changed, 23 insertions, 24 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_alloc.c b/sys/gnu/fs/ext2fs/ext2_alloc.c index f78b6a5..ef0338d 100644 --- a/sys/gnu/fs/ext2fs/ext2_alloc.c +++ b/sys/gnu/fs/ext2fs/ext2_alloc.c @@ -349,7 +349,7 @@ return ENOSPC; ip->i_flag |= IN_CHANGE | IN_UPDATE; if (!doasyncfree) { gettime(&tv); - VOP_UPDATE(vp, &tv, &tv, MNT_WAIT); + UFS_UPDATE(vp, &tv, &tv, MNT_WAIT); } } if (ssize < len) diff --git a/sys/gnu/fs/ext2fs/ext2_extern.h b/sys/gnu/fs/ext2fs/ext2_extern.h index b185f52..d6b04d0 100644 --- a/sys/gnu/fs/ext2fs/ext2_extern.h +++ b/sys/gnu/fs/ext2fs/ext2_extern.h @@ -62,7 +62,7 @@ int ext2_reallocblks __P((struct vop_reallocblks_args *)); int ext2_reclaim __P((struct vop_reclaim_args *)); void ext2_setblock __P((struct ext2_sb_info *, u_char *, daddr_t)); int ext2_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); -int ext2_update __P((struct vop_update_args *)); +int ext2_update __P((struct vnode *, struct timeval *, struct timeval *, int)); int ext2_valloc __P((struct vnode *, int, struct ucred *, struct vnode **)); int ext2_vfree __P((struct vnode *, ino_t, int)); int ext2_lookup __P((struct vop_cachedlookup_args *)); diff --git a/sys/gnu/fs/ext2fs/ext2_inode.c b/sys/gnu/fs/ext2fs/ext2_inode.c index 0514022..001fd2d 100644 --- a/sys/gnu/fs/ext2fs/ext2_inode.c +++ b/sys/gnu/fs/ext2fs/ext2_inode.c @@ -63,6 +63,7 @@ #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> +#include <ufs/ufs/ufsmount.h> #include <ufs/ufs/ufs_extern.h> #include <gnu/ext2fs/ext2_fs.h> @@ -89,13 +90,11 @@ ext2_init(struct vfsconf *vfsp) * complete. */ int -ext2_update(ap) - struct vop_update_args /* { - struct vnode *a_vp; - struct timeval *a_access; - struct timeval *a_modify; - int a_waitfor; - } */ *ap; +ext2_update(vp, access, modify, waitfor) + struct vnode *vp; + struct timeval *access; + struct timeval *modify; + int waitfor; { register struct ext2_sb_info *fs; struct buf *bp; @@ -105,8 +104,8 @@ ext2_update(ap) struct timeval time; #endif - ip = VTOI(ap->a_vp); - if (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY) { + ip = VTOI(vp); + if (vp->v_mount->mnt_flag & MNT_RDONLY) { ip->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE); return (0); @@ -115,9 +114,9 @@ ext2_update(ap) (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0) return (0); if (ip->i_flag & IN_ACCESS) - ip->i_atime = ap->a_access->tv_sec; + ip->i_atime = access->tv_sec; if (ip->i_flag & IN_UPDATE) { - ip->i_mtime = ap->a_modify->tv_sec; + ip->i_mtime = modify->tv_sec; ip->i_modrev++; } if (ip->i_flag & IN_CHANGE) { @@ -137,7 +136,7 @@ ext2_update(ap) ext2_di2ei( &ip->i_din, (struct ext2_inode *) ((char *)bp->b_data + EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number))); /* - if (ap->a_waitfor && (ap->a_vp->v_mount->mnt_flag & MNT_ASYNC) == 0) + if (waitfor && (vp->v_mount->mnt_flag & MNT_ASYNC) == 0) return (bwrite(bp)); else { */ @@ -196,11 +195,11 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); bzero((char *)&oip->i_shortlink, (u_int)oip->i_size); oip->i_size = 0; oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 1)); + return (UFS_UPDATE(ovp, &tv, &tv, 1)); } if (oip->i_size == length) { oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 0)); + return (UFS_UPDATE(ovp, &tv, &tv, 0)); } #if QUOTA if (error = getinoquota(oip)) @@ -233,7 +232,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); else bawrite(bp); oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 1)); + return (UFS_UPDATE(ovp, &tv, &tv, 1)); } /* * Shorten the size of the file. If the file is not being @@ -292,7 +291,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); for (i = NDADDR - 1; i > lastblock; i--) oip->i_db[i] = 0; oip->i_flag |= IN_CHANGE | IN_UPDATE; - if (error = VOP_UPDATE(ovp, &tv, &tv, MNT_WAIT)) + if (error = UFS_UPDATE(ovp, &tv, &tv, MNT_WAIT)) allerror = error; /* * Having written the new inode to disk, save its new configuration diff --git a/sys/gnu/fs/ext2fs/ext2_mount.h b/sys/gnu/fs/ext2fs/ext2_mount.h index 50bfe57..ee79631 100644 --- a/sys/gnu/fs/ext2fs/ext2_mount.h +++ b/sys/gnu/fs/ext2fs/ext2_mount.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95 - * $Id: ufsmount.h,v 1.10 1997/10/12 20:26:28 phk Exp $ + * $Id: ufsmount.h,v 1.11 1997/10/16 10:50:27 phk Exp $ */ #ifndef _UFS_UFS_UFSMOUNT_H_ @@ -99,12 +99,14 @@ struct ufsmount { struct malloc_type *um_malloctype; /* The inodes malloctype */ int (*um_blkatoff) __P((struct vnode *, off_t, char **, struct buf **)); int (*um_truncate) __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); + int (*um_update) __P((struct vnode *, struct timeval *, struct timeval *, int)); int (*um_valloc) __P((struct vnode *, int, struct ucred *, struct vnode **)); int (*um_vfree) __P((struct vnode *, ino_t, int)); }; #define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd) #define UFS_TRUNCATE(aa, bb, cc, dd, ee) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd, ee) +#define UFS_UPDATE(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_update(aa, bb, cc, dd) #define UFS_VALLOC(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_valloc(aa, bb, cc, dd) #define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc) diff --git a/sys/gnu/fs/ext2fs/ext2_readwrite.c b/sys/gnu/fs/ext2fs/ext2_readwrite.c index e1ab506..d748999 100644 --- a/sys/gnu/fs/ext2fs/ext2_readwrite.c +++ b/sys/gnu/fs/ext2fs/ext2_readwrite.c @@ -314,7 +314,7 @@ WRITE(ap) } } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) { gettime(&tv); - error = VOP_UPDATE(vp, &tv, &tv, 1); + error = UFS_UPDATE(vp, &tv, &tv, 1); } return (error); } diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 95ffa52..7112758 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -623,6 +623,7 @@ ext2_mountfs(devvp, mp, p) ump->um_malloctype = M_EXT2NODE; ump->um_blkatoff = ext2_blkatoff; ump->um_truncate = ext2_truncate; + ump->um_update = ext2_update; ump->um_valloc = ext2_valloc; ump->um_vfree = ext2_vfree; /* I don't know whether this is the right strategy. Note that diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c index 48b5907..2fc383e 100644 --- a/sys/gnu/fs/ext2fs/ext2_vnops.c +++ b/sys/gnu/fs/ext2fs/ext2_vnops.c @@ -91,7 +91,6 @@ static struct vnodeopv_entry_desc ext2_vnodeop_entries[] = { { &vop_read_desc, (vop_t *) ext2_read }, { &vop_readdir_desc, (vop_t *) ext2_readdir }, { &vop_reallocblks_desc, (vop_t *) ext2_reallocblks }, - { &vop_update_desc, (vop_t *) ext2_update }, { &vop_write_desc, (vop_t *) ext2_write }, { NULL, NULL } }; @@ -103,7 +102,6 @@ static struct vnodeopv_entry_desc ext2_specop_entries[] = { { &vop_default_desc, (vop_t *) ufs_vnoperatespec }, { &vop_fsync_desc, (vop_t *) ext2_fsync }, { &vop_inactive_desc, (vop_t *) ext2_inactive }, - { &vop_update_desc, (vop_t *) ext2_update }, { NULL, NULL } }; static struct vnodeopv_desc ext2fs_specop_opv_desc = @@ -114,7 +112,6 @@ static struct vnodeopv_entry_desc ext2_fifoop_entries[] = { { &vop_default_desc, (vop_t *) ufs_vnoperatefifo }, { &vop_fsync_desc, (vop_t *) ext2_fsync }, { &vop_inactive_desc, (vop_t *) ext2_inactive }, - { &vop_update_desc, (vop_t *) ext2_update }, { NULL, NULL } }; static struct vnodeopv_desc ext2fs_fifoop_opv_desc = @@ -200,5 +197,5 @@ loop: } splx(s); gettime(&tv); - return (VOP_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)); + return (UFS_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)); } |