From owner-freebsd-scsi Mon Nov 25 4:15:16 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9848737B401; Mon, 25 Nov 2002 04:15:15 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40CD943E9C; Mon, 25 Nov 2002 04:15:14 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id XAA08851; Mon, 25 Nov 2002 23:15:06 +1100 Date: Mon, 25 Nov 2002 23:28:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Yar Tikhiy Cc: Nate Lawson , Subject: Re: {da,sa,...}open bug? In-Reply-To: <20021125134302.D14452@comp.chem.msu.su> Message-ID: <20021125230811.K56791-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, 25 Nov 2002, Yar Tikhiy wrote: > While preparing the fix, I noticed an additional couple of oddities. > First, files under sys/cam/scsi are inconsistent as to the order of > calling cam_periph_release() and cam_periph_unlock(): Some of them > will call cam_periph_release() first, and the others will call it second. > Then, there's a number of places in the code where cam_periph_unlock() > won't be called before return on a cam_periph_acquire() error, though > the "periph" has been locked. I'd like this fixed too. I still have some patches written about 4 years ago for a couple of these reversals. I think things should be unlocked or released in the reverse of the order in which they were locked or acquired, if possible. BTW, are the locks still necessary? I think the locking in the disk mini-layer should be sufficent if it isn't already. But it seems to be broken (it times out after 1 second). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message