Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3052549pxp; Tue, 22 Mar 2022 11:03:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiHT6b+o1tc9gBf5WFcqRUzy9EyqgSIcSvEBpYevr0PCTRMGK8dpFiZuKg4FfysfaTAoX9 X-Received: by 2002:a17:906:9b94:b0:6db:472:db87 with SMTP id dd20-20020a1709069b9400b006db0472db87mr27760464ejc.624.1647972201610; Tue, 22 Mar 2022 11:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647972201; cv=none; d=google.com; s=arc-20160816; b=Ln/9wIjv43537UFKzYP/F4M9Q3XLmT0PIPyc575qioEARg+wJFSAknM5SC/PWlkdQA 9dIHHXyWYHP/SUAdP4PCbO+rYiwHGtaZRHFOsi9VGBkn4tu+3Qf1+VGWpfGf/HEc/E0g rlLlFp98Fs1MKU4e2RPWpNAGDeLo7TDVOeBmwnidC6nNJnIQ1YgeIC6nh3NmFUyivgp8 7q9sgeYVxwfpAHPkhns55yKVqXnj4bhy8Yzmchmomrb8VApWzvFXOod4aBilk23AcHyC OUCNcE/7bEF2YASDc+YMBQySzdqIbNErqk01PTJDO3U7jXh4NvVa2DaZvwRo1FpkUK8F R9+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Ds8UhRcnwgL+PTsMmtGk0dZObDS0ZcnpdXwm8SUB1Tk=; b=U3rJpwOftZCjor4z4Mwc36kNsmJgK+n2Lf1Lddwt5BePRsR11B0vAJPI+UWfjTcsmm YGn2qPnPsD5q5jZQ5tO7rOGM4Sk1We8Td99xFrEXb4Vjcj6Ne4rSBN0TPKHH4zwlTm9s 3DI+7qdTxgfHRdjq/VDuVFgcgbQvO0BVy4H/mVhwHGocDs+YkX3+8WGEdHLjzL8IG6CR T44ZZqt6kN0q1wPPe6uPaqgTYtv0RSVlyDraUY4Jo7QKT9XGRxHzRy2k1n2kd7MlQISE zj0WWGVfSxy7mOXntUrtSUxz+vIRdeFFEQzqf7PoVVLrrFIFnFD/ZPbUPTU/uJphBTce 1Umg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y68-20020a50bb4a000000b00418c2b5bd2dsi12448164ede.15.2022.03.22.11.02.55; Tue, 22 Mar 2022 11:03:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234137AbiCVLZG (ORCPT + 99 others); Tue, 22 Mar 2022 07:25:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232938AbiCVLZE (ORCPT ); Tue, 22 Mar 2022 07:25:04 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20E051F623; Tue, 22 Mar 2022 04:23:36 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id CE79568AFE; Tue, 22 Mar 2022 12:23:31 +0100 (CET) Date: Tue, 22 Mar 2022 12:23:31 +0100 From: Christoph Hellwig To: John Garry Cc: axboe@kernel.dk, damien.lemoal@opensource.wdc.com, bvanassche@acm.org, jejb@linux.ibm.com, martin.petersen@oracle.com, hch@lst.de, ming.lei@redhat.com, hare@suse.de, chenxiang66@hisilicon.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, dm-devel@redhat.com, beanhuo@micron.com Subject: Re: [PATCH 04/11] scsi: libsas: Send SMP commands through the block layer Message-ID: <20220322112331.GD29270@lst.de> References: <1647945585-197349-1-git-send-email-john.garry@huawei.com> <1647945585-197349-5-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1647945585-197349-5-git-send-email-john.garry@huawei.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wouldn't it make more sense to have a new member in th Scsi_Host_template that gets called for these request early from ->queue_rq instead of the new request_queue and custome ops? FYI, I think reusing the block layer for all these command is a good idea but the way it is done here seems a bit ugly and not very maintainable.