Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2865504pxp; Tue, 22 Mar 2022 07:29:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx11eqk9jUL2igT5YFD5Yf3elBr//4FsCeCuY4NNl4m/0qg3ulMEAWDiU1FkxxFM3IZ+7hV X-Received: by 2002:a17:90b:4a88:b0:1c7:9bc:a72e with SMTP id lp8-20020a17090b4a8800b001c709bca72emr5334285pjb.112.1647959389273; Tue, 22 Mar 2022 07:29:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647959389; cv=none; d=google.com; s=arc-20160816; b=BwjlSLlaamdqqTw5G9fQH6oKe8A2eEJ+FVRCm59YhZ7l4SRZ89fxqwRukY+l1NJEbd dpQyg8eU4DdwPjlXLOdLLMaRlcyR7Cq5ApeKHBmDKqt4IS9Pnw34RHSVMkJ/5R4fpWOo mc6I4Fo6IAp0l7Mk7snasq2MLyOHGcNYYxLx2ilhudf3oPoT5Dsx0OjiRxN5QytAu0tM OAwYU+654RYJMvZ0fjaxGLpz58QPY6LZPFresMfWwzQ8rpBKJ7vfQtvgrMxom7CLSspV vzE11PTLdjXD/+lfQ3UzZwRK0flLIJlc5jmxHSRVB5s+cgCjpGxvPY8L+4Q+4lE3+bIa 3wHQ== 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=41nnFD0Z8h5fFSKqD+mFjQggAPwcKsOQqBmHSGulDhI=; b=w0hoTj575AUndZNpsXf3DSsDSIZwktrjyZmUmZaUXDj1hfepLFNhocXiV2VeKCCc8D /6adPC/lo6x9JDbAXd9tqfDqX3mwg4m6JIg9nJd9cMQSEswrmcfEbYYm1BN67z7XPczY Bhf8G7YjZ6IcfY/F1xOxhtoz9uFeyujnQ431Ce0Nrd+7hn/iAPmHSaq2WcI+P7bp1o3L /bwe5HzDPwOYV/bMxzr/SXMiA7noEqlNRDiA0LB4uGSLjmDaJ6BkLOUhP58rfuTF/bbK xXvO7Lgf/n16edNBanQW6tOp1M+NotdHv+uQzVCn55bT26XKFTv18IYoIy2fEETAo0fh MWHw== 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 h67-20020a625346000000b004fa3a8dff62si9783400pfb.25.2022.03.22.07.29.35; Tue, 22 Mar 2022 07:29:49 -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 S234121AbiCVLW3 (ORCPT + 99 others); Tue, 22 Mar 2022 07:22:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231368AbiCVLW1 (ORCPT ); Tue, 22 Mar 2022 07:22:27 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A8847EA36; Tue, 22 Mar 2022 04:21:00 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 8834368AFE; Tue, 22 Mar 2022 12:20:57 +0100 (CET) Date: Tue, 22 Mar 2022 12:20:57 +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 03/11] libata: Send internal commands through the block layer Message-ID: <20220322112057.GC29270@lst.de> References: <1647945585-197349-1-git-send-email-john.garry@huawei.com> <1647945585-197349-4-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-4-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 On Tue, Mar 22, 2022 at 06:39:37PM +0800, John Garry wrote: > When SCSI HBA device drivers are required to process an ATA internal > command they still need a tag for the IO. This often requires the driver > to set aside a set of tags for these sorts of IOs and manage the tags > themselves. > > If we associate a SCSI command (and request) with an ATA internal command > then the tag is already provided, so introduce the change to send ATA > internal commands through the block layer with a set of custom blk-mq ops. > > note: I think that the timeout handling needs to be fixed up. Any reason to not just send them through an ATA_16 passthrough CDB and just use all the normal SCSI command handling?