From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760273Ab0I0XGs (ORCPT ); Mon, 27 Sep 2010 19:06:48 -0400 Received: from smtp125.sbc.mail.sp1.yahoo.com ([69.147.65.184]:37970 "HELO smtp125.sbc.mail.sp1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757460Ab0I0XGq (ORCPT ); Mon, 27 Sep 2010 19:06:46 -0400 X-Yahoo-SMTP: fzDSGlOswBCWnIOrNw7KwwK1j9PqyNbe5PtLKiS4dDU.UNl_t6bdEZu9tTLW X-YMail-OSG: yVdcvxMVM1lIcPh0K57Dab.W1ynWHHEOXfzC.G8UJUiLlFU 659G6a8as7r9HDeJnyxo4q9ylCfG23fX.hbsuqjLY2DSTXYLFHzZBaQ2_sLy TwVCOijjjU2ok5BBVdDxBrwcs86qj3bxJcXHfCOI7c8S_yzSBWQEf2gKfa2A oxBsUANvItuLTntuaUfgOvoD_QiHdXKJ9LiL1pAC2Cky_vqPPh75bu1NDzVs VZk_S33IMlBYwNmalGJKpxLLgrwhbqmsY6SmiswgjmDrNtuD4kMqkcJDRlab w5kLj__oenYF.97TkK0a236U- X-Yahoo-Newman-Property: ymail-3 Subject: Re: [PATCH v2 01/11] scsi: Convert struct Scsi_Host->cmd_serial_number to atomic_t From: "Nicholas A. Bellinger" To: Christof Schmitt Cc: Mike Christie , Joe Eykholt , linux-scsi , linux-kernel , Vasu Dev , Tim Chen , Andi Kleen , Matthew Wilcox , James Bottomley , James Smart , Andrew Vasquez , FUJITA Tomonori , Hannes Reinecke , Christoph Hellwig In-Reply-To: <20100927140551.GB8473@schmichrtp.mainz.de.ibm.com> References: <1284747709-20862-1-git-send-email-nab@linux-iscsi.org> <4C93BB8E.2080501@cisco.com> <4C9427B6.9050404@cs.wisc.edu> <1284839878.13344.300.camel@haakon2.linux-iscsi.org> <20100927140551.GB8473@schmichrtp.mainz.de.ibm.com> Content-Type: text/plain Date: Mon, 27 Sep 2010 16:02:28 -0700 Message-Id: <1285628548.8880.64.camel@haakon2.linux-iscsi.org> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2010-09-27 at 16:05 +0200, Christof Schmitt wrote: > On Sat, Sep 18, 2010 at 12:57:58PM -0700, Nicholas A. Bellinger wrote: > > On Fri, 2010-09-17 at 21:45 -0500, Mike Christie wrote: > > > On 09/17/2010 02:03 PM, Joe Eykholt wrote: > > > > > > > > How about instead of adding use_serial_number, let's just have the > > > > drivers that want a serial number call scsi_cmd_get_serial() > > > > > > I think this sounds better. > > > > > > > In that case I will go ahead and add explict scsi_cmd_get_serial() calls > > to the LLDs that use struct scsi_cmnd->serial_number in anything beyond > > an obvious and simple informational purpose. > > > > > You could also convert drivers to the host tagging if you needed a > > > unique id for each command sent to a host. > > > > Hmmm, what does this entail again..? > > > > > > > > > and stop calling it from scsi_dispatch_cmd()? AFAICT, it's only > > > > used in debug messages in some drivers. I didn't find other usages > > > > but didn't do an exhaustive search. > > > > > > The comments for serial_number say that it is only supposed to be used > > > for debugging printks and most drivers use it for that. > > > > So I would suppose it would be OK for those drivers to continue to > > printk serial_number to show the internal serial_number allocation is > > now disabled by default. > > > > > > > > zfcp looks like it copies it. It does not look like the driver needs it. > > > > > > > Ok, I will look at removing it's usage in zfcp or if necessary add an > > the explict scsi_cmd_get_serial() call. > > In zfcp, the serial_number is only accessed for writing it to debug > traces. With the change that the driver has to request the serial > number through use_serial_number, simply remove the serial number from > zfcp. Hi Christof, So since the use of struct scsi_cmnd->serial_number is purely informational for some LLDs (including zfcp) , I have been putting the conversion of these LLDs as a low priority ATM. I would happily accept a patch to remove these. 8-) Best, --nab