Deleted Added
full compact
ffs_vfsops.c (1542) ffs_vfsops.c (1549)
1/*
2 * Copyright (c) 1989, 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 70 unchanged lines hidden (view full) ---

79
80/*
81 * Called by main() when ufs is going to be mounted as root.
82 *
83 * Name is updated by mount(8) after booting.
84 */
85#define ROOTNAME "root_device"
86
1/*
2 * Copyright (c) 1989, 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 70 unchanged lines hidden (view full) ---

79
80/*
81 * Called by main() when ufs is going to be mounted as root.
82 *
83 * Name is updated by mount(8) after booting.
84 */
85#define ROOTNAME "root_device"
86
87int
87ffs_mountroot()
88{
89 extern struct vnode *rootvp;
90 register struct fs *fs;
91 register struct mount *mp;
92 struct proc *p = curproc; /* XXX */
93 struct ufsmount *ump;
94 u_int size;

--- 46 unchanged lines hidden (view full) ---

141 register struct mount *mp;
142 char *path;
143 caddr_t data;
144 struct nameidata *ndp;
145 struct proc *p;
146{
147 struct vnode *devvp;
148 struct ufs_args args;
88ffs_mountroot()
89{
90 extern struct vnode *rootvp;
91 register struct fs *fs;
92 register struct mount *mp;
93 struct proc *p = curproc; /* XXX */
94 struct ufsmount *ump;
95 u_int size;

--- 46 unchanged lines hidden (view full) ---

142 register struct mount *mp;
143 char *path;
144 caddr_t data;
145 struct nameidata *ndp;
146 struct proc *p;
147{
148 struct vnode *devvp;
149 struct ufs_args args;
149 struct ufsmount *ump;
150 struct ufsmount *ump = 0;
150 register struct fs *fs;
151 u_int size;
152 int error, flags;
153
154 if (error = copyin(data, (caddr_t)&args, sizeof (struct ufs_args)))
155 return (error);
156 /*
157 * If updating, check whether changing from read-only to

--- 75 unchanged lines hidden (view full) ---

233 * Things to do to update the mount:
234 * 1) invalidate all cached meta-data.
235 * 2) re-read superblock from disk.
236 * 3) re-read summary information from disk.
237 * 4) invalidate all inactive vnodes.
238 * 5) invalidate all cached file data.
239 * 6) re-read inode data for all active vnodes.
240 */
151 register struct fs *fs;
152 u_int size;
153 int error, flags;
154
155 if (error = copyin(data, (caddr_t)&args, sizeof (struct ufs_args)))
156 return (error);
157 /*
158 * If updating, check whether changing from read-only to

--- 75 unchanged lines hidden (view full) ---

234 * Things to do to update the mount:
235 * 1) invalidate all cached meta-data.
236 * 2) re-read superblock from disk.
237 * 3) re-read summary information from disk.
238 * 4) invalidate all inactive vnodes.
239 * 5) invalidate all cached file data.
240 * 6) re-read inode data for all active vnodes.
241 */
242int
241ffs_reload(mountp, cred, p)
242 register struct mount *mountp;
243 struct ucred *cred;
244 struct proc *p;
245{
246 register struct vnode *vp, *nvp, *devvp;
247 struct inode *ip;
248 struct csum *space;

--- 193 unchanged lines hidden (view full) ---

442 return (error);
443}
444
445/*
446 * Sanity checks for old file systems.
447 *
448 * XXX - goes away some day.
449 */
243ffs_reload(mountp, cred, p)
244 register struct mount *mountp;
245 struct ucred *cred;
246 struct proc *p;
247{
248 register struct vnode *vp, *nvp, *devvp;
249 struct inode *ip;
250 struct csum *space;

--- 193 unchanged lines hidden (view full) ---

444 return (error);
445}
446
447/*
448 * Sanity checks for old file systems.
449 *
450 * XXX - goes away some day.
451 */
452int
450ffs_oldfscompat(fs)
451 struct fs *fs;
452{
453 int i;
454
455 fs->fs_npsect = max(fs->fs_npsect, fs->fs_nsect); /* XXX */
456 fs->fs_interleave = max(fs->fs_interleave, 1); /* XXX */
457 if (fs->fs_postblformat == FS_42POSTBLFMT) /* XXX */

--- 46 unchanged lines hidden (view full) ---

504 mp->mnt_data = (qaddr_t)0;
505 mp->mnt_flag &= ~MNT_LOCAL;
506 return (error);
507}
508
509/*
510 * Flush out all the files in a filesystem.
511 */
453ffs_oldfscompat(fs)
454 struct fs *fs;
455{
456 int i;
457
458 fs->fs_npsect = max(fs->fs_npsect, fs->fs_nsect); /* XXX */
459 fs->fs_interleave = max(fs->fs_interleave, 1); /* XXX */
460 if (fs->fs_postblformat == FS_42POSTBLFMT) /* XXX */

--- 46 unchanged lines hidden (view full) ---

507 mp->mnt_data = (qaddr_t)0;
508 mp->mnt_flag &= ~MNT_LOCAL;
509 return (error);
510}
511
512/*
513 * Flush out all the files in a filesystem.
514 */
515int
512ffs_flushfiles(mp, flags, p)
513 register struct mount *mp;
514 int flags;
515 struct proc *p;
516{
517 extern int doforce;
518 register struct ufsmount *ump;
519 int i, error;

--- 261 unchanged lines hidden (view full) ---

781 return (ESTALE);
782 return (ufs_check_export(mp, ufhp, nam, vpp, exflagsp, credanonp));
783}
784
785/*
786 * Vnode pointer to File handle
787 */
788/* ARGSUSED */
516ffs_flushfiles(mp, flags, p)
517 register struct mount *mp;
518 int flags;
519 struct proc *p;
520{
521 extern int doforce;
522 register struct ufsmount *ump;
523 int i, error;

--- 261 unchanged lines hidden (view full) ---

785 return (ESTALE);
786 return (ufs_check_export(mp, ufhp, nam, vpp, exflagsp, credanonp));
787}
788
789/*
790 * Vnode pointer to File handle
791 */
792/* ARGSUSED */
793int
789ffs_vptofh(vp, fhp)
790 struct vnode *vp;
791 struct fid *fhp;
792{
793 register struct inode *ip;
794 register struct ufid *ufhp;
795
796 ip = VTOI(vp);

--- 47 unchanged lines hidden ---
794ffs_vptofh(vp, fhp)
795 struct vnode *vp;
796 struct fid *fhp;
797{
798 register struct inode *ip;
799 register struct ufid *ufhp;
800
801 ip = VTOI(vp);

--- 47 unchanged lines hidden ---