From owner-freebsd-questions@FreeBSD.ORG Tue Jan 24 01:09:13 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABF7E16A41F for ; Tue, 24 Jan 2006 01:09:13 +0000 (GMT) (envelope-from sbruno@miralink.com) Received: from mazo.miralink.com (mail.miralink.com [70.103.185.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4E2E43D4C for ; Tue, 24 Jan 2006 01:09:12 +0000 (GMT) (envelope-from sbruno@miralink.com) Received: from [10.1.1.47] (unknown [10.1.1.47]) by mazo.miralink.com (Postfix) with ESMTP id 1B43636A34 for ; Thu, 19 Jan 2006 10:11:18 -0800 (PST) From: Sean Bruno To: freebsd-questions@freebsd.org Content-Type: text/plain Date: Thu, 19 Jan 2006 10:10:50 -0800 Message-Id: <1137694250.32081.5.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Content-Transfer-Encoding: 7bit Subject: 4.11 b_iodone callback question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jan 2006 01:09:13 -0000 I just inherited some older code that runs under 4.11 ... the core of software is a device driver that writes data to two separate disks(da1/da2). It appears that the authors are using a call back function to handle some interesting behavior related to the second disk being a circular buffer. So a couple of questions: 1. Does the call back routine set in b_iodone(disk writes are handled by VOP_STRATEGY) get invoked in a separate thread of execution, i.e. is simultaneous with the main code path? 2. Is it o.k. to have the callback routine invoke itself vi b_iodone(more VOP_STRATEGY) without locking the buffers used for the disk writes? Sean Bruno