Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934914Ab0KQQKQ (ORCPT ); Wed, 17 Nov 2010 11:10:16 -0500 Received: from cantor.suse.de ([195.135.220.2]:43090 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934779Ab0KQQKL (ORCPT ); Wed, 17 Nov 2010 11:10:11 -0500 Subject: Re: [PATCH] scsi: Convert scsi_host->cmd_serial_number to odd numbered atomic_t counter From: James Bottomley To: Mike Anderson Cc: "Nicholas A. Bellinger" , linux-scsi , linux-kernel , Jeff Garzik , Christoph Hellwig In-Reply-To: <20101111223650.GA10257@linux.vnet.ibm.com> References: <1289472405-31003-1-git-send-email-nab@linux-iscsi.org> <1289490783.2982.33.camel@mulgrave.site> <1289511475.2867.138.camel@haakon2.linux-iscsi.org> <1289512549.2982.44.camel@mulgrave.site> <20101111223650.GA10257@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 17 Nov 2010 10:10:06 -0600 Message-ID: <1290010206.4736.47.camel@mulgrave.site> Mime-Version: 1.0 X-Mailer: Evolution 2.30.1.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1649 Lines: 39 On Thu, 2010-11-11 at 14:36 -0800, Mike Anderson wrote: > James Bottomley wrote: > > On Thu, 2010-11-11 at 13:37 -0800, Nicholas A. Bellinger wrote: > > > > > > ..snip.. > > > > > > Sounds good to me, but you will recall the last attempt to make > > > scsi_cmd_get_serial() optional for the special case LLDs, that we > > > started running quickly in the legacy usage of cmd->serial_number in > > > scsi_softirq_done() and the side effects in scsi_try_to_abort_cmd(), who > > > use is complex enough that we have not found a proper resolution > > > sufficent to andmike discussed here: > > > > Yes, that's what I meant by "eliminate the overloading of the serial > > number zero value" above. This needs fixing before the serial number > > can be dumped for fast hba drivers. > > > > In the last email referenced below I believed that since > scsi_softirq_done is calling scsi_eh_scmd_add without the > SCSI_EH_CANCEL_CMD flag set this will stop scsi_try_to_abort_cmd from > being called. Since scsi_softirq_done is the one setting serial_number > to 0 I do not believe we can hit the serial number == 0 check in > scsi_try_to_abort_cmd anymore. > > > > http://marc.info/?l=linux-scsi&m=128820726325009&w=2 I buy this. The REQ_ATOM_COMPLETE flag in the block layer now mediates timer vs completion atomically ... so either one or the other is allowed to occur. James -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/