mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Rework MOUNTED/DOING SOFTDEP/SUJ macros
Now MNT_SOFTDEP indicates that SU are active in any variant +-J, and SU+J is indicated by MNT_SOFTDEP | MNT_SUJ combination. The reason is that unmount will be able to easily hide SU from other operations by clearing MNT_SOFTDEP while keeping the record of the active journal. Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D29178
This commit is contained in:
parent
81cdb19e04
commit
7f682bdcab
|
@ -3024,7 +3024,6 @@ journal_mount(mp, fs, cred)
|
|||
|
||||
MNT_ILOCK(mp);
|
||||
mp->mnt_flag |= MNT_SUJ;
|
||||
mp->mnt_flag &= ~MNT_SOFTDEP;
|
||||
MNT_IUNLOCK(mp);
|
||||
|
||||
/*
|
||||
|
|
|
@ -265,11 +265,11 @@ struct indir {
|
|||
#define ITOV(ip) ((ip)->i_vnode)
|
||||
|
||||
/* Determine if soft dependencies are being done */
|
||||
#define DOINGSOFTDEP(vp) \
|
||||
(((vp)->v_mount->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) != 0)
|
||||
#define MOUNTEDSOFTDEP(mp) (((mp)->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) != 0)
|
||||
#define DOINGSUJ(vp) (((vp)->v_mount->mnt_flag & MNT_SUJ) != 0)
|
||||
#define MOUNTEDSUJ(mp) (((mp)->mnt_flag & MNT_SUJ) != 0)
|
||||
#define MOUNTEDSOFTDEP(mp) (((mp)->mnt_flag & MNT_SOFTDEP) != 0)
|
||||
#define DOINGSOFTDEP(vp) MOUNTEDSOFTDEP((vp)->v_mount)
|
||||
#define MOUNTEDSUJ(mp) (((mp)->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) == \
|
||||
(MNT_SOFTDEP | MNT_SUJ))
|
||||
#define DOINGSUJ(vp) MOUNTEDSUJ((vp)->v_mount)
|
||||
|
||||
/* This overlays the fid structure (see mount.h). */
|
||||
struct ufid {
|
||||
|
|
Loading…
Reference in a new issue