Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2864067pxp; Tue, 22 Mar 2022 07:28:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRagPDiZRedyv2QEpjlm/hcs/njlD5jWirmyQcAN0R62USLNnaJivM0ejZsJpAy77iv5NO X-Received: by 2002:a9d:70da:0:b0:5b2:4dcf:fc74 with SMTP id w26-20020a9d70da000000b005b24dcffc74mr9745981otj.376.1647959286012; Tue, 22 Mar 2022 07:28:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647959286; cv=none; d=google.com; s=arc-20160816; b=EYq2oXKMeUIapvz9HfaNbL5vObJseLRsLtnX1FfTh1N9Po9lE8wB04txrx4UAjM9Qa JNGKXMGKSmH7NM3wKW8qKKB3VCZELkwXpJMGXIE0U587fdX4Yd137cYKe2I5x/YTly+N KlTw+jtJRaTG8JOYyVKDumAAOs9p4lh8o4Xs8z9Uf0ppNFrY9l6vPby1zUFHt6AL1/tC p0+CbYmuBCVAzeNzCyKNQDwyM4j/SnvIDq6lWqL4AWLtTMzBvRIbWCND3dlP8qSlZiF4 Ox8HQ64snoSDVPCqsilP50pAhPmfHtJgf8+gQAIjAS6NOi+UETngjbDmB3e/N3acYoY3 jh4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=xwTDU72hap+pDV6sfjg5rW90FHqr+Hdex4/it5F+uDM=; b=vnX6aL+rfWRnNi20Zy5jgBtpOKa3gi45dHNtqFDk4H3+fz+nceU26tcVJvB5cI82do CJ3SmOsjSgqZXaBWbb9NQV8oCWViuvyvyVqvszhRn4HcownGVjcGGTVS0Z7S+wzzd5PP gyC69rA+BA2xuIUQ3EdYUgtLwDZ6xGe3ml3uDnnqdenqCFxE7sEREJoZPfz6ddF69Qzv pyNDXl2qfo9LO3MwxsFuNVj9rEA2ZHXV5y1uY+dcVzpgHBm2O1oEEW/Mf53u9XbJn5mU JWFXf5RW1Y50g9bHqRROx26/7YsA6qxmbqUTW421ym7y1vS+jCTgPLBeqyCQEKcOCZCL S6Ww== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lw11-20020a0568708e0b00b000da99d3539bsi7968257oab.305.2022.03.22.07.27.52; Tue, 22 Mar 2022 07:28:05 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234241AbiCVLhg (ORCPT + 99 others); Tue, 22 Mar 2022 07:37:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232890AbiCVLhf (ORCPT ); Tue, 22 Mar 2022 07:37:35 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD52E65B6; Tue, 22 Mar 2022 04:36:08 -0700 (PDT) Received: from fraeml740-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KN8Y2430zz67yKG; Tue, 22 Mar 2022 19:35:02 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml740-chm.china.huawei.com (10.206.15.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 22 Mar 2022 12:36:06 +0100 Received: from [10.47.85.68] (10.47.85.68) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 22 Mar 2022 11:36:04 +0000 Message-ID: <8498ddc5-e5a5-16b3-bc70-2cfbc79d5258@huawei.com> Date: Tue, 22 Mar 2022 11:36:03 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH 03/11] libata: Send internal commands through the block layer To: Christoph Hellwig CC: , , , , , , , , , , , , , References: <1647945585-197349-1-git-send-email-john.garry@huawei.com> <1647945585-197349-4-git-send-email-john.garry@huawei.com> <20220322112057.GC29270@lst.de> From: John Garry In-Reply-To: <20220322112057.GC29270@lst.de> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.85.68] X-ClientProxiedBy: lhreml730-chm.china.huawei.com (10.201.108.81) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,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 22/03/2022 11:20, Christoph Hellwig wrote: > 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? > > . No reason that I know about. TBH, I was hoping that someone woud have a better idea on how to do this as what I was doing was messy. Let me check it. Cheers, John