ffs_vfsops.c (a02bd3e38ccefc7c2de92652ebd11d12e53efa85) ffs_vfsops.c (fb14e73cb4062d7272ce6183d748adedd868906b)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1989, 1991, 1993, 1994
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

769 struct ufsmount *ump;
770 struct fs *fs;
771 struct cdev *dev;
772 int error, i, len, ronly;
773 struct ucred *cred;
774 struct g_consumer *cp;
775 struct mount *nmp;
776 int candelete;
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1989, 1991, 1993, 1994
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

769 struct ufsmount *ump;
770 struct fs *fs;
771 struct cdev *dev;
772 int error, i, len, ronly;
773 struct ucred *cred;
774 struct g_consumer *cp;
775 struct mount *nmp;
776 int candelete;
777 off_t loc;
777
778 fs = NULL;
779 ump = NULL;
780 cred = td ? td->td_ucred : NOCRED;
781 ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
782
783 KASSERT(devvp->v_type == VCHR, ("reclaimed devvp"));
784 dev = devvp->v_rdev;

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

805 if ((SBLOCKSIZE % cp->provider->sectorsize) != 0) {
806 error = EINVAL;
807 vfs_mount_error(mp,
808 "Invalid sectorsize %d for superblock size %d",
809 cp->provider->sectorsize, SBLOCKSIZE);
810 goto out;
811 }
812 /* fetch the superblock and summary information */
778
779 fs = NULL;
780 ump = NULL;
781 cred = td ? td->td_ucred : NOCRED;
782 ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
783
784 KASSERT(devvp->v_type == VCHR, ("reclaimed devvp"));
785 dev = devvp->v_rdev;

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

806 if ((SBLOCKSIZE % cp->provider->sectorsize) != 0) {
807 error = EINVAL;
808 vfs_mount_error(mp,
809 "Invalid sectorsize %d for superblock size %d",
810 cp->provider->sectorsize, SBLOCKSIZE);
811 goto out;
812 }
813 /* fetch the superblock and summary information */
813 if ((error = ffs_sbget(devvp, &fs, -1, M_UFSMNT, ffs_use_bread)) != 0)
814 loc = STDSB;
815 if ((mp->mnt_flag & MNT_ROOTFS) != 0)
816 loc = STDSB_NOHASHFAIL;
817 if ((error = ffs_sbget(devvp, &fs, loc, M_UFSMNT, ffs_use_bread)) != 0)
814 goto out;
818 goto out;
815 fs->fs_fmod = 0;
816 /* none of these types of check-hashes are maintained by this kernel */
817 fs->fs_metackhash &= ~(CK_INODE | CK_INDIR | CK_DIR);
818 /* no support for any undefined flags */
819 fs->fs_flags &= FS_SUPPORTED;
820 fs->fs_flags &= ~FS_UNCLEAN;
821 if (fs->fs_clean == 0) {
822 fs->fs_flags |= FS_UNCLEAN;
823 if (ronly || (mp->mnt_flag & MNT_FORCE) ||

--- 1503 unchanged lines hidden ---
819 /* none of these types of check-hashes are maintained by this kernel */
820 fs->fs_metackhash &= ~(CK_INODE | CK_INDIR | CK_DIR);
821 /* no support for any undefined flags */
822 fs->fs_flags &= FS_SUPPORTED;
823 fs->fs_flags &= ~FS_UNCLEAN;
824 if (fs->fs_clean == 0) {
825 fs->fs_flags |= FS_UNCLEAN;
826 if (ronly || (mp->mnt_flag & MNT_FORCE) ||

--- 1503 unchanged lines hidden ---