Subject: Re: PR/34293 CVS commit: src/sys/dev
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 09/05/2006 12:55:04
The following reply was made to PR kern/34293; it has been noted by GNATS.

From: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
To: mlelstv@serpens.de
Cc: gnats-bugs@NetBSD.org, kern-bug-people@NetBSD.org,
	gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: PR/34293 CVS commit: src/sys/dev
Date: Tue,  5 Sep 2006 21:53:37 +0900 (JST)

 > >  > vndstrategy isn't called from interrupt context.
 > >  
 > >  It is, if called from another driver (e.g. Xen block device).
 > 
 > I believe that this is not allowed. The strategy routine is
 > part of the top half of the driver, it operates in process
 > context.
 
 have you read the referred thread?
 
 > Saying that, I scanned other drivers and found several that may
 > sleep in their strategy() routine. Most promiment scsistrategy()
 > does this (by virtue of calling scsipi_command which waits for
 > a free scsi transfer context in scsipi_get_xs).
 
 scsistrategy is not a d_strategy routine.
 
 > >  > But if that is
 > >  > a problem, the feedback loop can be put into both vndread()/vndwrite().
 > >  I'm not sure we're allowed to tsleep() here either.
 > 
 > vndread()/vndwrite() definitely do already tsleep() in physio() exactly
 > when they are waiting for buffers. However, I was mistaken that these
 > routines were passed when accessing the block device but they are
 > only used by the raw device.
 
 does your "mkfs.ext2" use a block device, rather than a raw device?
 
 YAMAMOTO Takashi