Index: sys/ufs/ffs/ffs_vfsops.c =================================================================== --- sys/ufs/ffs/ffs_vfsops.c +++ sys/ufs/ffs/ffs_vfsops.c @@ -147,7 +147,7 @@ */ static const char *ffs_opts[] = { "acls", "async", "noatime", "noclusterr", "noclusterw", "noexec", "export", "force", "from", "groupquota", - "multilabel", "nfsv4acls", "fsckpid", "snapshot", "nosuid", "suiddir", + "multilabel", "nfsv4acls", "snapshot", "nosuid", "suiddir", "nosymfollow", "sync", "union", "userquota", "untrusted", NULL }; static int ffs_enxio_enable = 1; @@ -347,7 +347,6 @@ struct thread *td; struct ufsmount *ump = NULL; struct fs *fs; - pid_t fsckpid = 0; int error, error1, flags; uint64_t mntorflags, saved_mnt_flag; accmode_t accmode; @@ -395,31 +394,6 @@ vfs_deleteopt(mp->mnt_opt, "snapshot"); } - if (vfs_getopt(mp->mnt_optnew, "fsckpid", NULL, NULL) == 0 && - vfs_scanopt(mp->mnt_optnew, "fsckpid", "%d", &fsckpid) == 1) { - /* - * Once we have set the restricted PID, do not - * persist "fsckpid" in the options list. - */ - vfs_deleteopt(mp->mnt_optnew, "fsckpid"); - vfs_deleteopt(mp->mnt_opt, "fsckpid"); - if (mp->mnt_flag & MNT_UPDATE) { - if (VFSTOUFS(mp)->um_fs->fs_ronly == 0 && - vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) == 0) { - vfs_mount_error(mp, - "Checker enable: Must be read-only"); - return (EINVAL); - } - } else if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) == 0) { - vfs_mount_error(mp, - "Checker enable: Must be read-only"); - return (EINVAL); - } - /* Set to -1 if we are done */ - if (fsckpid == 0) - fsckpid = -1; - } - if (vfs_getopt(mp->mnt_optnew, "nfsv4acls", NULL, NULL) == 0) { if (mntorflags & MNT_ACLS) { vfs_mount_error(mp, @@ -443,18 +417,6 @@ fs = ump->um_fs; odevvp = ump->um_odevvp; devvp = ump->um_devvp; - if (fsckpid == -1 && ump->um_fsckpid > 0) { - if ((error = ffs_flushfiles(mp, WRITECLOSE, td)) != 0 || - (error = ffs_sbupdate(ump, MNT_WAIT, 0)) != 0) - return (error); - g_topology_lock(); - /* - * Return to normal read-only mode. - */ - error = g_access(ump->um_cp, 0, -1, 0); - g_topology_unlock(); - ump->um_fsckpid = 0; - } if (fs->fs_ronly == 0 && vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) { /* @@ -659,39 +621,6 @@ mp->mnt_flag |= MNT_NFS4ACLS; MNT_IUNLOCK(mp); } - /* - * If this is a request from fsck to clean up the filesystem, - * then allow the specified pid to proceed. - */ - if (fsckpid > 0) { - if (ump->um_fsckpid != 0) { - vfs_mount_error(mp, - "Active checker already running on %s", - fs->fs_fsmnt); - return (EINVAL); - } - KASSERT(MOUNTEDSOFTDEP(mp) == 0, - ("soft updates enabled on read-only file system")); - g_topology_lock(); - /* - * Request write access. - */ - error = g_access(ump->um_cp, 0, 1, 0); - g_topology_unlock(); - if (error) { - vfs_mount_error(mp, - "Checker activation failed on %s", - fs->fs_fsmnt); - return (error); - } - ump->um_fsckpid = fsckpid; - if (fs->fs_snapinum[0] != 0) - ffs_snapshot_mount(mp); - fs->fs_mtime = time_second; - fs->fs_fmod = 1; - fs->fs_clean = 0; - (void) ffs_sbupdate(ump, MNT_WAIT, 0); - } /* * If this is a snapshot request, take the snapshot. @@ -771,29 +700,6 @@ vrele(devvp); return (error); } - if (fsckpid > 0) { - KASSERT(MOUNTEDSOFTDEP(mp) == 0, - ("soft updates enabled on read-only file system")); - ump = VFSTOUFS(mp); - fs = ump->um_fs; - g_topology_lock(); - /* - * Request write access. - */ - error = g_access(ump->um_cp, 0, 1, 0); - g_topology_unlock(); - if (error) { - printf("WARNING: %s: Checker activation " - "failed\n", fs->fs_fsmnt); - } else { - ump->um_fsckpid = fsckpid; - if (fs->fs_snapinum[0] != 0) - ffs_snapshot_mount(mp); - fs->fs_mtime = time_second; - fs->fs_clean = 0; - (void) ffs_sbupdate(ump, MNT_WAIT, 0); - } - } } MNT_ILOCK(mp);