Changeset View
Changeset View
Standalone View
Standalone View
sys/ufs/ffs/ffs_vfsops.c
Show First 20 Lines • Show All 926 Lines • ▼ Show 20 Lines | ffs_reload(struct mount *mp, struct thread *td, int flags) | ||||
* superblock location by copying these fields into our new | * superblock location by copying these fields into our new | ||||
* superblock before using it to update the existing superblock. | * superblock before using it to update the existing superblock. | ||||
*/ | */ | ||||
newfs->fs_si = fs->fs_si; | newfs->fs_si = fs->fs_si; | ||||
newfs->fs_ronly = fs->fs_ronly; | newfs->fs_ronly = fs->fs_ronly; | ||||
sblockloc = fs->fs_sblockloc; | sblockloc = fs->fs_sblockloc; | ||||
bcopy(newfs, fs, (u_int)fs->fs_sbsize); | bcopy(newfs, fs, (u_int)fs->fs_sbsize); | ||||
brelse(bp); | brelse(bp); | ||||
mp->mnt_maxsymlinklen = fs->fs_maxsymlinklen; | ump->um_maxsymlinklen = fs->fs_maxsymlinklen; | ||||
ffs_oldfscompat_read(fs, VFSTOUFS(mp), sblockloc); | ffs_oldfscompat_read(fs, VFSTOUFS(mp), sblockloc); | ||||
UFS_LOCK(ump); | UFS_LOCK(ump); | ||||
if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) { | if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) { | ||||
printf("WARNING: %s: reload pending error: blocks %jd " | printf("WARNING: %s: reload pending error: blocks %jd " | ||||
"files %d\n", fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks, | "files %d\n", fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks, | ||||
fs->fs_pendinginodes); | fs->fs_pendinginodes); | ||||
fs->fs_pendingblocks = 0; | fs->fs_pendingblocks = 0; | ||||
fs->fs_pendinginodes = 0; | fs->fs_pendinginodes = 0; | ||||
▲ Show 20 Lines • Show All 246 Lines • ▼ Show 20 Lines | #endif | ||||
mp->mnt_stat.f_fsid.val[1] = fs->fs_id[1]; | mp->mnt_stat.f_fsid.val[1] = fs->fs_id[1]; | ||||
nmp = NULL; | nmp = NULL; | ||||
if (fs->fs_id[0] == 0 || fs->fs_id[1] == 0 || | if (fs->fs_id[0] == 0 || fs->fs_id[1] == 0 || | ||||
(nmp = vfs_getvfs(&mp->mnt_stat.f_fsid))) { | (nmp = vfs_getvfs(&mp->mnt_stat.f_fsid))) { | ||||
if (nmp) | if (nmp) | ||||
vfs_rel(nmp); | vfs_rel(nmp); | ||||
vfs_getnewfsid(mp); | vfs_getnewfsid(mp); | ||||
} | } | ||||
mp->mnt_maxsymlinklen = fs->fs_maxsymlinklen; | ump->um_maxsymlinklen = fs->fs_maxsymlinklen; | ||||
MNT_ILOCK(mp); | MNT_ILOCK(mp); | ||||
mp->mnt_flag |= MNT_LOCAL; | mp->mnt_flag |= MNT_LOCAL; | ||||
MNT_IUNLOCK(mp); | MNT_IUNLOCK(mp); | ||||
if ((fs->fs_flags & FS_MULTILABEL) != 0) { | if ((fs->fs_flags & FS_MULTILABEL) != 0) { | ||||
#ifdef MAC | #ifdef MAC | ||||
MNT_ILOCK(mp); | MNT_ILOCK(mp); | ||||
mp->mnt_flag |= MNT_MULTILABEL; | mp->mnt_flag |= MNT_MULTILABEL; | ||||
MNT_IUNLOCK(mp); | MNT_IUNLOCK(mp); | ||||
▲ Show 20 Lines • Show All 1,549 Lines • Show Last 20 Lines |