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)



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)
Date: Wed, 5 Dec 2018 10:28:28 +0100

 --Apple-Mail=_6219B15B-4A05-4835-8608-FF6A8F5937DF
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 
 > On 5. Dec 2018, at 10:00, Andreas Gustafsson <gson%gson.org@localhost> wrote:
 <snip>
 > trace: pid 0 lid 125 at 0xffffa3003b6d4d30
 > sleepq_block() at netbsd:sleepq_block+0x99
 > cv_wait() at netbsd:cv_wait+0xf1
 > fstrans_start() at netbsd:fstrans_start+0x73c
 > VOP_LOCK() at netbsd:VOP_LOCK+0x57
 > vn_lock() at netbsd:vn_lock+0x90
 > vndthread() at netbsd:vndthread+0x2bd
 
 Oops, my bad -- we have to protect handle_with_strategy() too.
 
 Please try the attached diff.
 
 --
 J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)
 
 --Apple-Mail=_6219B15B-4A05-4835-8608-FF6A8F5937DF
 Content-Disposition: attachment;
 	filename=vnd.c.diff
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="vnd.c.diff"
 Content-Transfer-Encoding: 7bit
 
 diff -r 400ec4f24994 sys/dev/vnd.c
 --- sys/dev/vnd.c
 +++ sys/dev/vnd.c
 @@ -733,12 +733,17 @@ vndthread(void *arg)
  		bp->b_bcount = obp->b_bcount;
  		BIO_COPYPRIO(bp, obp);
  
 +		/* Make sure the request succeeds while suspending this fs. */
 +		fstrans_start_lazy(vnd->sc_vp->v_mount);
 +
  		/* Handle the request using the appropriate operations. */
  		if ((vnd->sc_flags & VNF_USE_VN_RDWR) == 0)
  			handle_with_strategy(vnd, obp, bp);
  		else
  			handle_with_rdwr(vnd, obp, bp);
  
 +		fstrans_done(vnd->sc_vp->v_mount);
 +
  		s = splbio();
  		continue;
  
 @@ -804,9 +809,6 @@ handle_with_rdwr(struct vnd_softc *vnd, 
  		    bp->b_bcount);
  #endif
  
 -	/* Make sure the request succeeds while suspending this fs. */
 -	fstrans_start_lazy(vp->v_mount);
 -
  	/* Issue the read or write operation. */
  	bp->b_error =
  	    vn_rdwr(doread ? UIO_READ : UIO_WRITE,
 @@ -828,8 +830,6 @@ handle_with_rdwr(struct vnd_softc *vnd, 
  	else
  		mutex_exit(vp->v_interlock);
  
 -	fstrans_done(vp->v_mount);
 -
  	/* We need to increase the number of outputs on the vnode if
  	 * there was any write to it. */
  	if (!doread) {
 
 --Apple-Mail=_6219B15B-4A05-4835-8608-FF6A8F5937DF--
 


Home | Main Index | Thread Index | Old Index