From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754671Ab2JBWW7 (ORCPT ); Tue, 2 Oct 2012 18:22:59 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:37215 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752287Ab2JBWW6 (ORCPT ); Tue, 2 Oct 2012 18:22:58 -0400 To: Li Zhong Cc: James Bottomley , "Martin K. Petersen" , LKML , linux-scsi@vger.kernel.org, "Paul E. McKenney" Subject: Re: [PATCH v2 scsi] Short the path length of scsi_cmd_to_driver() From: "Martin K. Petersen" Organization: Oracle References: <1348464626.2475.13.camel@ThinkPad-T420> <1348465493.2467.3.camel@dabdike> <1348470210.2475.47.camel@ThinkPad-T420> <1348472104.2467.8.camel@dabdike> <1348721055.2509.0.camel@dabdike> <1348818498.2411.8.camel@dabdike.int.hansenpartnership.com> <1348892617.6455.4.camel@ThinkPad-T420> Date: Tue, 02 Oct 2012 18:22:49 -0400 In-Reply-To: <1348892617.6455.4.camel@ThinkPad-T420> (Li Zhong's message of "Sat, 29 Sep 2012 12:23:37 +0800") Message-ID: User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.0.97 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: acsinet21.oracle.com [141.146.126.237] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Li" == Li Zhong writes: Li> As suggested by James: this patch tries to short the path length of Li> scsi_cmd_to_driver(). As only REQ_TYPE_BLOCK_PC commands can be Li> submitted without a driver, so we could avoid the related NULL Li> checking, as long as we make sure we don't use it for Li> REQ_TYPE_BLOCK_PC type commands. Plus, this fixes a bug where you Li> get different behaviors from REQ_TYPE_BLOCK_PC commands when a Li> driver is and isn't attached. Acked-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering