Subject: kern/1403: ufs/ffs change not completed
To: None <gnats-bugs@gnats.netbsd.org>
From: John Kohl <jtk@kolvir.arlington.ma.us>
List: netbsd-bugs
Date: 08/23/1995 22:26:20
>Number: 1403
>Category: kern
>Synopsis: ufs/ffs change not completed
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 23 22:50:02 1995
>Last-Modified:
>Originator: John Kohl
>Organization:
NetBSD Kernel Hackers `R` Us
>Release: -current as of 22 August 1995
>Environment:
System: NetBSD pattern 1.0A NetBSD 1.0A (PATTERN) #75: Wed Aug 23 21:42:47 EDT 1995 jtk@pattern:/u3/dest/usr/src/sys/arch/i386/compile/PATTERN i386
>Description:
The change from mount_ufs to mount_ffs is not complete
>How-To-Repeat:
type 'mount' and see that things claim to be type 'ufs' rather than 'ffs'
>Fix:
===================================================================
RCS file: sbin/fsck/RCS/main.c,v
retrieving revision 1.1
diff -c -r1.1 sbin/fsck/main.c
*** sbin/fsck/main.c 1995/08/24 01:47:47 1.1
--- sbin/fsck/main.c 1995/08/24 02:22:59
***************
*** 330,336 ****
args.export.ex_flags = 0;
args.export.ex_root = 0;
flags |= MNT_UPDATE | MNT_RELOAD;
! ret = mount(MOUNT_UFS, "/", flags, &args);
if (ret == 0)
return(0);
}
--- 330,336 ----
args.export.ex_flags = 0;
args.export.ex_root = 0;
flags |= MNT_UPDATE | MNT_RELOAD;
! ret = mount(MOUNT_FFS, "/", flags, &args);
if (ret == 0)
return(0);
}
===================================================================
RCS file: sbin/mount_ffs/RCS/mount_ffs.c,v
retrieving revision 1.1
diff -c -r1.1 sbin/mount_ffs/mount_ffs.c
*** sbin/mount_ffs/mount_ffs.c 1995/08/24 01:21:51 1.1
--- sbin/mount_ffs/mount_ffs.c 1995/08/24 01:21:57
***************
*** 107,113 ****
else
args.export.ex_flags = 0;
! if (mount(MOUNT_UFS, fs_name, mntflags, &args) < 0) {
switch (errno) {
case EMFILE:
errcause = "mount table full";
--- 107,113 ----
else
args.export.ex_flags = 0;
! if (mount(MOUNT_FFS, fs_name, mntflags, &args) < 0) {
switch (errno) {
case EMFILE:
errcause = "mount table full";
===================================================================
RCS file: sys/sys/RCS/mount.h,v
retrieving revision 1.1.2.3
diff -c -r1.1.2.3 sys/sys/mount.h
*** sys/sys/mount.h 1995/07/01 04:12:19 1.1.2.3
--- sys/sys/mount.h 1995/08/24 01:19:37
***************
*** 82,88 ****
/*
* File system types.
*/
! #define MOUNT_UFS "ufs" /* UNIX "Fast" Filesystem */
#define MOUNT_NFS "nfs" /* Network Filesystem */
#define MOUNT_MFS "mfs" /* Memory Filesystem */
#define MOUNT_MSDOS "msdos" /* MSDOS Filesystem */
--- 82,89 ----
/*
* File system types.
*/
! #define MOUNT_FFS "ffs" /* Berkeley "Fast" Filesystem */
! #define MOUNT_UFS MOUNT_FFS
#define MOUNT_NFS "nfs" /* Network Filesystem */
#define MOUNT_MFS "mfs" /* Memory Filesystem */
#define MOUNT_MSDOS "msdos" /* MSDOS Filesystem */
===================================================================
RCS file: sys/kern/RCS/vfs_conf.c,v
retrieving revision 1.1
diff -c -r1.1 sys/kern/vfs_conf.c
*** sys/kern/vfs_conf.c 1995/08/24 01:21:11 1.1
--- sys/kern/vfs_conf.c 1995/08/24 01:21:21
***************
*** 50,56 ****
* The types are defined in mount.h.
*/
#ifdef FFS
! extern struct vfsops ufs_vfsops;
#endif
#ifdef LFS
--- 50,56 ----
* The types are defined in mount.h.
*/
#ifdef FFS
! extern struct vfsops ffs_vfsops;
#endif
#ifdef LFS
***************
*** 116,122 ****
struct vfsops *vfssw[] = {
NULL, /* 0 = MOUNT_NONE */
#ifdef FFS
! &ufs_vfsops, /* 1 = MOUNT_UFS */
#else
NULL,
#endif
--- 116,122 ----
struct vfsops *vfssw[] = {
NULL, /* 0 = MOUNT_NONE */
#ifdef FFS
! &ffs_vfsops, /* 1 = MOUNT_FFS */
#else
NULL,
#endif
===================================================================
RCS file: sys/ufs/ffs/RCS/ffs_vfsops.c,v
retrieving revision 1.1
diff -c -r1.1 sys/ufs/ffs/ffs_vfsops.c
*** sys/ufs/ffs/ffs_vfsops.c 1995/08/24 01:20:21 1.1
--- sys/ufs/ffs/ffs_vfsops.c 1995/08/24 02:13:23
***************
*** 63,70 ****
int ffs_sbupdate __P((struct ufsmount *, int));
! struct vfsops ufs_vfsops = {
! MOUNT_UFS,
ffs_mount,
ufs_start,
ffs_unmount,
--- 63,70 ----
int ffs_sbupdate __P((struct ufsmount *, int));
! struct vfsops ffs_vfsops = {
! MOUNT_FFS,
ffs_mount,
ufs_start,
ffs_unmount,
***************
*** 105,111 ****
mp = malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK);
bzero((char *)mp, (u_long)sizeof(struct mount));
! mp->mnt_op = &ufs_vfsops;
mp->mnt_flag = MNT_RDONLY;
if (error = ffs_mountfs(rootvp, mp, p)) {
free(mp, M_MOUNT);
--- 105,111 ----
mp = malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK);
bzero((char *)mp, (u_long)sizeof(struct mount));
! mp->mnt_op = &ffs_vfsops;
mp->mnt_flag = MNT_RDONLY;
if (error = ffs_mountfs(rootvp, mp, p)) {
free(mp, M_MOUNT);
***************
*** 487,493 ****
}
mp->mnt_data = (qaddr_t)ump;
mp->mnt_stat.f_fsid.val[0] = (long)dev;
! mp->mnt_stat.f_fsid.val[1] = makefstype(MOUNT_UFS);
mp->mnt_maxsymlinklen = fs->fs_maxsymlinklen;
mp->mnt_flag |= MNT_LOCAL;
ump->um_mountp = mp;
--- 487,493 ----
}
mp->mnt_data = (qaddr_t)ump;
mp->mnt_stat.f_fsid.val[0] = (long)dev;
! mp->mnt_stat.f_fsid.val[1] = makefstype(MOUNT_FFS);
mp->mnt_maxsymlinklen = fs->fs_maxsymlinklen;
mp->mnt_flag |= MNT_LOCAL;
ump->um_mountp = mp;
rcsdiff: compat/osf1/RCS/osf1_mount.c,v: No such file or directory
===================================================================
RCS file: usr.sbin/quot/RCS/quot.c,v
retrieving revision 1.1
diff -c -r1.1 usr.sbin/quot/quot.c
*** usr.sbin/quot/quot.c 1995/08/24 02:15:05 1.1
--- usr.sbin/quot/quot.c 1995/08/24 02:15:18
***************
*** 30,36 ****
*/
#ifndef lint
! static char rcsid[] = "$Id: quot.c,v 1.1 1995/08/24 02:15:05 jtk Exp $";
#endif /* not lint */
#include <sys/param.h>
--- 30,36 ----
*/
#ifndef lint
! static char rcsid[] = "$Id: quot.c,v 1.2 1995/08/24 02:15:18 jtk Exp $";
#endif /* not lint */
#include <sys/param.h>
***************
*** 567,573 ****
if (all) {
cnt = getmntinfo(&mp,MNT_NOWAIT);
for (; --cnt >= 0; mp++) {
! if (!strncmp(mp->f_fstypename, MOUNT_UFS, MFSNAMELEN)) {
if (nm = strrchr(mp->f_mntfromname,'/')) {
sprintf(dev,"/dev/r%s",nm + 1);
nm = dev;
--- 567,573 ----
if (all) {
cnt = getmntinfo(&mp,MNT_NOWAIT);
for (; --cnt >= 0; mp++) {
! if (!strncmp(mp->f_fstypename, MOUNT_FFS, MFSNAMELEN)) {
if (nm = strrchr(mp->f_mntfromname,'/')) {
sprintf(dev,"/dev/r%s",nm + 1);
nm = dev;
===================================================================
RCS file: usr.sbin/pstat/RCS/pstat.c,v
retrieving revision 1.1
diff -c -r1.1 usr.sbin/pstat/pstat.c
*** usr.sbin/pstat/pstat.c 1995/08/24 02:15:45 1.1
--- usr.sbin/pstat/pstat.c 1995/08/24 02:16:06
***************
*** 39,45 ****
#ifndef lint
/* from: static char sccsid[] = "@(#)pstat.c 8.9 (Berkeley) 2/16/94"; */
! static char *rcsid = "$Id: pstat.c,v 1.1 1995/08/24 02:15:45 jtk Exp $";
#endif /* not lint */
#include <sys/param.h>
--- 39,45 ----
#ifndef lint
/* from: static char sccsid[] = "@(#)pstat.c 8.9 (Berkeley) 2/16/94"; */
! static char *rcsid = "$Id: pstat.c,v 1.2 1995/08/24 02:16:05 jtk Exp $";
#endif /* not lint */
#include <sys/param.h>
***************
*** 328,334 ****
maddr = vp->v_mount;
mount_print(mp);
vnode_header();
! if (!strncmp(ST.f_fstypename, MOUNT_UFS, MFSNAMELEN) ||
!strncmp(ST.f_fstypename, MOUNT_MFS, MFSNAMELEN)) {
ufs_header();
} else if (!strncmp(ST.f_fstypename, MOUNT_NFS,
--- 328,334 ----
maddr = vp->v_mount;
mount_print(mp);
vnode_header();
! if (!strncmp(ST.f_fstypename, MOUNT_FFS, MFSNAMELEN) ||
!strncmp(ST.f_fstypename, MOUNT_MFS, MFSNAMELEN)) {
ufs_header();
} else if (!strncmp(ST.f_fstypename, MOUNT_NFS,
***************
*** 338,344 ****
(void)printf("\n");
}
vnode_print(evp->avnode, vp);
! if (!strncmp(ST.f_fstypename, MOUNT_UFS, MFSNAMELEN) ||
!strncmp(ST.f_fstypename, MOUNT_MFS, MFSNAMELEN)) {
ufs_print(vp);
} else if (!strncmp(ST.f_fstypename, MOUNT_NFS, MFSNAMELEN)) {
--- 338,344 ----
(void)printf("\n");
}
vnode_print(evp->avnode, vp);
! if (!strncmp(ST.f_fstypename, MOUNT_FFS, MFSNAMELEN) ||
!strncmp(ST.f_fstypename, MOUNT_MFS, MFSNAMELEN)) {
ufs_print(vp);
} else if (!strncmp(ST.f_fstypename, MOUNT_NFS, MFSNAMELEN)) {
===================================================================
RCS file: sbin/mountd/RCS/mountd.c,v
retrieving revision 1.1
diff -c -r1.1 sbin/mountd/mountd.c
*** sbin/mountd/mountd.c 1995/08/24 02:18:13 1.1
--- sbin/mountd/mountd.c 1995/08/24 02:18:23
***************
*** 636,642 ****
* And delete exports that are in the kernel for all local
* file systems.
* XXX: Should know how to handle all local exportable file systems
! * instead of just MOUNT_UFS.
*/
num = getmntinfo(&fsp, MNT_NOWAIT);
for (i = 0; i < num; i++) {
--- 636,642 ----
* And delete exports that are in the kernel for all local
* file systems.
* XXX: Should know how to handle all local exportable file systems
! * instead of just MOUNT_FFS.
*/
num = getmntinfo(&fsp, MNT_NOWAIT);
for (i = 0; i < num; i++) {
***************
*** 649,655 ****
} targs;
if (!strncmp(fsp->f_fstypename, MOUNT_MFS, MFSNAMELEN) ||
! !strncmp(fsp->f_fstypename, MOUNT_UFS, MFSNAMELEN) ||
!strncmp(fsp->f_fstypename, MOUNT_MSDOS, MFSNAMELEN) ||
!strncmp(fsp->f_fstypename, MOUNT_ADOSFS, MFSNAMELEN) ||
!strncmp(fsp->f_fstypename, MOUNT_CD9660, MFSNAMELEN)) {
--- 649,655 ----
} targs;
if (!strncmp(fsp->f_fstypename, MOUNT_MFS, MFSNAMELEN) ||
! !strncmp(fsp->f_fstypename, MOUNT_FFS, MFSNAMELEN) ||
!strncmp(fsp->f_fstypename, MOUNT_MSDOS, MFSNAMELEN) ||
!strncmp(fsp->f_fstypename, MOUNT_ADOSFS, MFSNAMELEN) ||
!strncmp(fsp->f_fstypename, MOUNT_CD9660, MFSNAMELEN)) {
***************
*** 1533,1539 ****
* Maybe I should just use the fsb->f_mntonname path instead
* of looping back up the dirp to the mount point??
* Also, needs to know how to export all types of local
! * exportable file systems and not just MOUNT_UFS.
*/
while (mount(fsb->f_fstypename, dirp,
fsb->f_flags | MNT_UPDATE, (caddr_t)&args) < 0) {
--- 1533,1539 ----
* Maybe I should just use the fsb->f_mntonname path instead
* of looping back up the dirp to the mount point??
* Also, needs to know how to export all types of local
! * exportable file systems and not just MOUNT_FFS.
*/
while (mount(fsb->f_fstypename, dirp,
fsb->f_flags | MNT_UPDATE, (caddr_t)&args) < 0) {
===================================================================
RCS file: bin/df/RCS/df.c,v
retrieving revision 1.1
diff -c -r1.1 bin/df/df.c
*** bin/df/df.c 1995/08/24 02:18:48 1.1
--- bin/df/df.c 1995/08/24 02:19:00
***************
*** 144,150 ****
warn("%s", mntpt);
continue;
}
! if (mount(MOUNT_UFS, mntpt, MNT_RDONLY,
&mdev) != 0) {
(void)rmdir(mntpt);
if (!ufs_df(*argv, &mntbuf[mntsize]))
--- 144,150 ----
warn("%s", mntpt);
continue;
}
! if (mount(MOUNT_FFS, mntpt, MNT_RDONLY,
&mdev) != 0) {
(void)rmdir(mntpt);
if (!ufs_df(*argv, &mntbuf[mntsize]))
***************
*** 393,399 ****
mntpt = "";
memmove(&sfsp->f_mntonname[0], mntpt, MNAMELEN);
memmove(&sfsp->f_mntfromname[0], file, MNAMELEN);
! strncpy(sfsp->f_fstypename, MOUNT_UFS, MFSNAMELEN);
(void)close(rfd);
return (0);
}
--- 393,399 ----
mntpt = "";
memmove(&sfsp->f_mntonname[0], mntpt, MNAMELEN);
memmove(&sfsp->f_mntfromname[0], file, MNAMELEN);
! strncpy(sfsp->f_fstypename, MOUNT_FFS, MFSNAMELEN);
(void)close(rfd);
return (0);
}
===================================================================
RCS file: lib/libc/sys/RCS/mount.2,v
retrieving revision 1.1
diff -c -r1.1 lib/libc/sys/mount.2
*** lib/libc/sys/mount.2 1995/08/24 02:16:41 1.1
--- lib/libc/sys/mount.2 1995/08/24 02:16:46
***************
*** 112,118 ****
The currently supported types of file systems and
their type specific data are:
.Pp
! .Dv MOUNT_UFS
.Bd -literal -offset indent -compact
struct ufs_args {
char *fspec; /* Block special file to mount */
--- 112,118 ----
The currently supported types of file systems and
their type specific data are:
.Pp
! .Dv MOUNT_FFS
.Bd -literal -offset indent -compact
struct ufs_args {
char *fspec; /* Block special file to mount */
>Audit-Trail:
>Unformatted: