Reduce the locking activity by epsilon by checking VNON condition before
releasing the mountlock.
This commit is contained in:
parent
570a7ddaa3
commit
f00f5d71c2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137008
@ -845,17 +845,16 @@ msdosfs_sync(mp, waitfor, cred, td)
|
||||
loop:
|
||||
MNT_VNODE_FOREACH(vp, mp, nvp) {
|
||||
VI_LOCK(vp);
|
||||
if (vp->v_iflag & VI_XLOCK) {
|
||||
if (vp->v_type == VNON || (vp->v_iflag & VI_XLOCK)) {
|
||||
VI_UNLOCK(vp);
|
||||
continue;
|
||||
}
|
||||
MNT_IUNLOCK(mp);
|
||||
dep = VTODE(vp);
|
||||
if (vp->v_type == VNON ||
|
||||
((dep->de_flag &
|
||||
if ((dep->de_flag &
|
||||
(DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0 &&
|
||||
(vp->v_bufobj.bo_dirty.bv_cnt == 0 ||
|
||||
waitfor == MNT_LAZY))) {
|
||||
waitfor == MNT_LAZY)) {
|
||||
VI_UNLOCK(vp);
|
||||
MNT_ILOCK(mp);
|
||||
continue;
|
||||
|
@ -922,17 +922,16 @@ ext2_sync(mp, waitfor, cred, td)
|
||||
loop:
|
||||
MNT_VNODE_FOREACH(vp, mp, nvp) {
|
||||
VI_LOCK(vp);
|
||||
if (vp->v_iflag & VI_XLOCK) {
|
||||
if (vp->v_type == VNON || (vp->v_iflag & VI_XLOCK)) {
|
||||
VI_UNLOCK(vp);
|
||||
continue;
|
||||
}
|
||||
MNT_IUNLOCK(mp);
|
||||
ip = VTOI(vp);
|
||||
if (vp->v_type == VNON ||
|
||||
((ip->i_flag &
|
||||
if ((ip->i_flag &
|
||||
(IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0 &&
|
||||
(vp->v_bufobj.bo_dirty.bv_cnt == 0 ||
|
||||
waitfor == MNT_LAZY))) {
|
||||
waitfor == MNT_LAZY)) {
|
||||
VI_UNLOCK(vp);
|
||||
MNT_ILOCK(mp);
|
||||
continue;
|
||||
|
@ -922,17 +922,16 @@ ext2_sync(mp, waitfor, cred, td)
|
||||
loop:
|
||||
MNT_VNODE_FOREACH(vp, mp, nvp) {
|
||||
VI_LOCK(vp);
|
||||
if (vp->v_iflag & VI_XLOCK) {
|
||||
if (vp->v_type == VNON || (vp->v_iflag & VI_XLOCK)) {
|
||||
VI_UNLOCK(vp);
|
||||
continue;
|
||||
}
|
||||
MNT_IUNLOCK(mp);
|
||||
ip = VTOI(vp);
|
||||
if (vp->v_type == VNON ||
|
||||
((ip->i_flag &
|
||||
if ((ip->i_flag &
|
||||
(IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0 &&
|
||||
(vp->v_bufobj.bo_dirty.bv_cnt == 0 ||
|
||||
waitfor == MNT_LAZY))) {
|
||||
waitfor == MNT_LAZY)) {
|
||||
VI_UNLOCK(vp);
|
||||
MNT_ILOCK(mp);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user