Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756327Ab1COK1X (ORCPT ); Tue, 15 Mar 2011 06:27:23 -0400 Received: from verein.lst.de ([213.95.11.211]:39757 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751721Ab1COK1V (ORCPT ); Tue, 15 Mar 2011 06:27:21 -0400 Date: Tue, 15 Mar 2011 11:27:20 +0100 From: Christoph Hellwig To: "Nicholas A. Bellinger" Cc: linux-scsi , linux-kernel , James Bottomley , Christoph Hellwig , Mike Christie , Hannes Reinecke , FUJITA Tomonori , Boaz Harrosh , Stephen Rothwell , Douglas Gilbert Subject: Re: [RFC-v2 11/12] iscsi-target: Add misc utility and debug logic Message-ID: <20110315102720.GC24496@lst.de> References: <1300103829-10337-1-git-send-email-nab@linux-iscsi.org> <1300103829-10337-12-git-send-email-nab@linux-iscsi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1300103829-10337-12-git-send-email-nab@linux-iscsi.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 945 Lines: 29 On Mon, Mar 14, 2011 at 04:57:08AM -0700, Nicholas A. Bellinger wrote: > +++ b/drivers/target/iscsi/iscsi_debug.h > @@ -0,0 +1,113 @@ > +#ifndef ISCSI_DEBUG_H > +#define ISCSI_DEBUG_H > + > +/* > + * Debugging Support > + */ > + > +#define TRACE_DEBUG 0x00000001 /* Verbose debugging */ > +#define TRACE_SCSI 0x00000002 /* Stuff related to SCSI Mid-layer */ Please use trace events for this kind of debugging. > + spin_lock_bh(&conn->cmd_lock); > + list_add_tail(&cmd->i_list, &conn->conn_cmd_list); > + spin_unlock_bh(&conn->cmd_lock); > + > + atomic_inc(&conn->active_cmds); Seems like this counter is always maintained together with the list, so it should be a non-atomic type under cmd_lock. -- 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/