From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [PATCH scsi-misc-2.6 04/08] scsi: remove meaningless volatile qualifiers from structure definitions Date: Tue, 22 Mar 2005 23:22:23 -0500 Message-ID: <4240EEFF.8030703@pobox.com> References: <20050323021335.960F95F8@htj.dyndns.org> <20050323021335.2655518E@htj.dyndns.org> <1111551327.5520.99.camel@mulgrave> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:8321 "EHLO parcelfarce.linux.theplanet.co.uk") by vger.kernel.org with ESMTP id S262759AbVCWEWi (ORCPT ); Tue, 22 Mar 2005 23:22:38 -0500 In-Reply-To: <1111551327.5520.99.camel@mulgrave> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: James Bottomley Cc: Tejun Heo , Jens Axboe , SCSI Mailing List , Linux Kernel James Bottomley wrote: > On Wed, 2005-03-23 at 11:14 +0900, Tejun Heo wrote: > >> scsi_device->device_busy, Scsi_Host->host_busy and >> ->host_failed have volatile qualifiers, but the qualifiers >> don't serve any purpose. Kill them. While at it, protect >> ->host_failed update in scsi_error for consistency and clarity. > > > Well ... the data here is volatile so what you're advocating is a move > away from a volatile variable model to a protected variable one ... did > you audit all users of both of these to make sure we have protection on > all of them? It looks like the sata strategy handlers would still rely > on the volatile data. volatile is almost always (a) buggy, or (b) hiding bugs. At the very least, barriers are usually needed. Almost every case really wants to be inside a spinlock, or atomic_t, or similarly protected. Specifically for SATA, I am making the presumption that SCSI is smart enough not to mess with host_failed until my error handler completes. Jeff