From owner-freebsd-hackers Fri Mar 6 18:12:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA04179 for freebsd-hackers-outgoing; Fri, 6 Mar 1998 18:12:19 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA04166 for ; Fri, 6 Mar 1998 18:12:07 -0800 (PST) (envelope-from grog@lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.8.7/8.8.5) with ESMTP id MAA16563 for ; Sat, 7 Mar 1998 12:42:04 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id MAA18640; Sat, 7 Mar 1998 12:42:04 +1030 (CST) (envelope-from grog) Message-ID: <19980307124203.50681@freebie.lemis.com> Date: Sat, 7 Mar 1998 12:42:03 +1030 From: Greg Lehey To: FreeBSD Hackers Subject: Can I call scsi_strategy from the bottom half of a driver? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89i WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've come up with a rather strange problem: to perform a write in my RAID 5 driver, I need to first read in all two blocks, exclusive or the results and the block to be written, and write the block back to disk. This should be transparent to the caller. Normal requests, say a read, are straightforward enough: build subrequests to read the blocks needed, set the buffer headers to call an iodone function on completion (B_CALL). The top half issues all the requets in parallel, and the iodone function counts down and does a biodone () on the caller's bp when they're all complete. There'd be no particular difficulty issuing another VOP_STRATEGY call from the iodone function, but I seem to recall that the strategy routine belongs to the top half, and shouldn't be called from the bottom half. I've checked the code, and I can't see any reason why not, but I could well have missed something. Could anybody comment? If I can't call the strategy from the bottom half, I can't think of a clean way to do it, so I'd appreciate comments on that too. Greg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message