Changeset View
Changeset View
Standalone View
Standalone View
head/sys/ufs/ffs/ffs_softdep.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 2,948 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static void | static void | ||||
journal_suspend(ump) | journal_suspend(ump) | ||||
struct ufsmount *ump; | struct ufsmount *ump; | ||||
{ | { | ||||
struct jblocks *jblocks; | struct jblocks *jblocks; | ||||
struct mount *mp; | struct mount *mp; | ||||
bool set; | |||||
mp = UFSTOVFS(ump); | mp = UFSTOVFS(ump); | ||||
if ((mp->mnt_kern_flag & MNTK_SUSPEND) != 0) | |||||
return; | |||||
jblocks = ump->softdep_jblocks; | jblocks = ump->softdep_jblocks; | ||||
vfs_op_enter(mp); | |||||
set = false; | |||||
MNT_ILOCK(mp); | MNT_ILOCK(mp); | ||||
if ((mp->mnt_kern_flag & MNTK_SUSPEND) == 0) { | if ((mp->mnt_kern_flag & MNTK_SUSPEND) == 0) { | ||||
stat_journal_min++; | stat_journal_min++; | ||||
mp->mnt_kern_flag |= MNTK_SUSPEND; | mp->mnt_kern_flag |= MNTK_SUSPEND; | ||||
mp->mnt_susp_owner = ump->softdep_flushtd; | mp->mnt_susp_owner = ump->softdep_flushtd; | ||||
set = true; | |||||
} | } | ||||
jblocks->jb_suspended = 1; | jblocks->jb_suspended = 1; | ||||
MNT_IUNLOCK(mp); | MNT_IUNLOCK(mp); | ||||
if (!set) | |||||
vfs_op_exit(mp); | |||||
} | } | ||||
static int | static int | ||||
journal_unsuspend(struct ufsmount *ump) | journal_unsuspend(struct ufsmount *ump) | ||||
{ | { | ||||
struct jblocks *jblocks; | struct jblocks *jblocks; | ||||
struct mount *mp; | struct mount *mp; | ||||
▲ Show 20 Lines • Show All 11,699 Lines • Show Last 20 Lines |