NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/53624 (dom0 freeze on domU exit) is still there
The following reply was made to PR kern/53624; it has been noted by GNATS.
From: "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/53624 (dom0 freeze on domU exit) is still there
Date: Fri, 4 Oct 2019 11:40:54 +0200
--Apple-Mail=_788E5721-9DB9-4F79-AE00-7266B8F7D8D0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Looks like we have to use fstrans_start_lazy() for VOP_STRATEGY() too
as it usually calls itself on the file system holding "/dev".
The attached diff could help, please give it a try.
--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)
--Apple-Mail=_788E5721-9DB9-4F79-AE00-7266B8F7D8D0
Content-Disposition: attachment;
filename=vnode_if.c.diff
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="vnode_if.c.diff"
Content-Transfer-Encoding: 7bit
diff -r b9b26f2b5eeb -r 45acdd7da973 sys/kern/vnode_if.c
--- sys/kern/vnode_if.c
+++ sys/kern/vnode_if.c
@@ -49,7 +49,7 @@
#include <sys/lock.h>
#include <sys/fstrans.h>
-enum fst_op { FST_NO, FST_YES, FST_TRY };
+enum fst_op { FST_NO, FST_YES, FST_LAZY, FST_TRY };
static inline int
vop_pre(vnode_t *vp, struct mount **mp, bool *mpsafe, enum fst_op op)
@@ -62,7 +62,7 @@ vop_pre(vnode_t *vp, struct mount **mp,
KERNEL_LOCK(1, curlwp);
}
- if (op == FST_YES || op == FST_TRY) {
+ if (op == FST_YES || op == FST_LAZY || op == FST_TRY) {
for (;;) {
*mp = vp->v_mount;
if (op == FST_TRY) {
@@ -73,6 +73,8 @@ vop_pre(vnode_t *vp, struct mount **mp,
}
return error;
}
+ } else if (op == FST_LAZY) {
+ fstrans_start_lazy(*mp);
} else {
fstrans_start(*mp);
}
@@ -91,7 +93,7 @@ static inline void
vop_post(vnode_t *vp, struct mount *mp, bool mpsafe, enum fst_op op)
{
- if (op == FST_YES) {
+ if (op == FST_YES || op == FST_LAZY) {
fstrans_done(mp);
}
@@ -1378,11 +1380,11 @@ VOP_STRATEGY(struct vnode *vp,
a.a_desc = VDESC(vop_strategy);
a.a_vp = vp;
a.a_bp = bp;
- error = vop_pre(vp, &mp, &mpsafe, FST_YES);
+ error = vop_pre(vp, &mp, &mpsafe, FST_LAZY);
if (error)
return error;
error = (VCALL(vp, VOFFSET(vop_strategy), &a));
- vop_post(vp, mp, mpsafe, FST_YES);
+ vop_post(vp, mp, mpsafe, FST_LAZY);
return error;
}
--Apple-Mail=_788E5721-9DB9-4F79-AE00-7266B8F7D8D0--
Home |
Main Index |
Thread Index |
Old Index