Third of several cleanups to soft dependency implementation.
Ensure that softdep_unmount() and softdep_setup_sbupdate() only get called for filesystems running with soft dependencies. No functional change. Tested by: Peter Holm and Scott Long Sponsored by: Netflix
This commit is contained in:
parent
dc82313758
commit
519e3c3b9f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=256808
@ -13686,6 +13686,17 @@ DB_SHOW_COMMAND(mkdirs, db_show_mkdirs)
|
||||
}
|
||||
}
|
||||
|
||||
/* exported to ffs_vfsops.c */
|
||||
extern void db_print_ffs(struct ufsmount *ump);
|
||||
void
|
||||
db_print_ffs(struct ufsmount *ump)
|
||||
{
|
||||
db_printf("mp %p %s devvp %p fs %p su_wl %d su_deps %d su_req %d\n",
|
||||
ump->um_mountp, ump->um_mountp->mnt_stat.f_mntonname,
|
||||
ump->um_devvp, ump->um_fs, ump->softdep_on_worklist,
|
||||
ump->softdep_deps, ump->softdep_req);
|
||||
}
|
||||
|
||||
#endif /* DDB */
|
||||
|
||||
#endif /* SOFTUPDATES */
|
||||
|
@ -1286,7 +1286,8 @@ ffs_unmount(mp, mntflags)
|
||||
fs->fs_pendinginodes = 0;
|
||||
}
|
||||
UFS_UNLOCK(ump);
|
||||
softdep_unmount(mp);
|
||||
if (MOUNTEDSOFTDEP(mp))
|
||||
softdep_unmount(mp);
|
||||
if (fs->fs_ronly == 0 || ump->um_fsckpid > 0) {
|
||||
fs->fs_clean = fs->fs_flags & (FS_UNCLEAN|FS_NEEDSFSCK) ? 0 : 1;
|
||||
error = ffs_sbupdate(ump, MNT_WAIT, 0);
|
||||
@ -1943,7 +1944,7 @@ ffs_sbupdate(ump, waitfor, suspended)
|
||||
}
|
||||
fs->fs_fmod = 0;
|
||||
fs->fs_time = time_second;
|
||||
if (fs->fs_flags & FS_DOSOFTDEP)
|
||||
if (MOUNTEDSOFTDEP(ump->um_mountp))
|
||||
softdep_setup_sbupdate(ump, (struct fs *)bp->b_data, bp);
|
||||
bcopy((caddr_t)fs, bp->b_data, (u_int)fs->fs_sbsize);
|
||||
ffs_oldfscompat_write((struct fs *)bp->b_data, ump);
|
||||
@ -2221,14 +2222,8 @@ ffs_own_mount(const struct mount *mp)
|
||||
|
||||
#ifdef DDB
|
||||
|
||||
static void
|
||||
db_print_ffs(struct ufsmount *ump)
|
||||
{
|
||||
db_printf("mp %p %s devvp %p fs %p su_wl %d su_deps %d su_req %d\n",
|
||||
ump->um_mountp, ump->um_mountp->mnt_stat.f_mntonname,
|
||||
ump->um_devvp, ump->um_fs, ump->softdep_on_worklist,
|
||||
ump->softdep_deps, ump->softdep_req);
|
||||
}
|
||||
/* defined in ffs_softdep.c */
|
||||
extern void db_print_ffs(struct ufsmount *ump);
|
||||
|
||||
DB_SHOW_COMMAND(ffs, db_show_ffs)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user