Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1235811iog; Thu, 16 Jun 2022 01:54:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vfZlVwagXMmMGuskFM47e4HNjUQ8ACD2arq4vuNjEo3b0u02LpXeNV/5GCoorqoXMck80I X-Received: by 2002:a17:906:1cc3:b0:711:24e4:70e1 with SMTP id i3-20020a1709061cc300b0071124e470e1mr3419996ejh.551.1655369660247; Thu, 16 Jun 2022 01:54:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655369660; cv=none; d=google.com; s=arc-20160816; b=0wJS8ImBtQmg6ZOJbTnrfExIWNuelYg79xbPk2jCBNaPyAgxgU+RYgEETJGzip4/1/ QHHZ/Omv/Vdm+5/qoGHCIDBkfj/nClxE2aJG+pqwRuKQg6rOmb7SvQn57ekMghwJ14UG 4ZK5XQ1QmrUvzQeAf5Yfk6F/mzrPgC02Za0X+wtPyu37X16+MsOkaqGsnVsqgUuHLi6A MePVdCa09dgseS9tJPERYozFk4bm1pP6ZxuMFfj0r7+27MH3IIHCr8Uh/FMNJL5muuR5 56z19BE/1YTmfHpmlm6bdPbCHjH0TPn3j+UjZqgj7WmauxZmsGIdgQ1Sw1ObPBjlWzoH DLQQ== 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=7vfEQQFwdMO5yn/nYDdjVmJU+kgTwCpvucGsoPsteBU=; b=JYqx0OfjTs2uMbFVAwgvA3bmk6gHUAieBHVuj5ZqkXXLogS4/6REk0XlbPHkJYPgze s+edDadpmQ7VqiyRbR9gg71suqsNv26UJLK2eGIAprre1289GfJemwzgEXHdiI/RdNO6 5kJXqp2wscPNR57draDx+YiSfQ77fgsezclooIQUih4+TJZP4ttZy8hOVLQscY5k6wPL eEpHj0Fne74wEA1mkJPMjfIamIZnXNWOIkSXy9YfIc/UE70fvqb8BCPjL2kabQCO0VlG 5T2H3wpXqq54thvEBRnf5EnUyIgoxraCoaXpoA/BJR0eCeKaydthI4wg1pdpWsLDpK2h 3WzQ== 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 ds1-20020a170907724100b0070d5a5343a3si1151642ejc.353.2022.06.16.01.53.52; Thu, 16 Jun 2022 01:54:20 -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 S1359533AbiFPIXM (ORCPT + 99 others); Thu, 16 Jun 2022 04:23:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230049AbiFPIXK (ORCPT ); Thu, 16 Jun 2022 04:23:10 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 842C821E12; Thu, 16 Jun 2022 01:23:09 -0700 (PDT) Received: from fraeml744-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LNwCk6HFHz6GCpY; Thu, 16 Jun 2022 16:22:58 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml744-chm.china.huawei.com (10.206.15.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 16 Jun 2022 10:23:07 +0200 Received: from [10.126.172.137] (10.126.172.137) 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.2375.24; Thu, 16 Jun 2022 09:23:05 +0100 Message-ID: Date: Thu, 16 Jun 2022 09:24:16 +0100 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 RFC v2 03/18] scsi: core: Implement reserved command handling To: Damien Le Moal , Bart Van Assche , , , , , , CC: , , , , References: <1654770559-101375-1-git-send-email-john.garry@huawei.com> <1654770559-101375-4-git-send-email-john.garry@huawei.com> <9e89360d-3325-92af-0436-b34df748f3e2@acm.org> <3a27b6ff-e495-8f11-6925-1487c9d14fa9@huawei.com> From: John Garry In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.126.172.137] X-ClientProxiedBy: lhreml715-chm.china.huawei.com (10.201.108.66) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,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 16/06/2022 03:47, Damien Le Moal wrote: >>> so going backward several years... That internal tag for ATA does not >>> need to be reserved since this command is always used when the drive is >>> idle and no other NCQ commands are on-going. >> >> So do you mean that ATA_TAG_INTERNAL qc is used for other commands >> apart from internal commands? > > No. It is used only for internal commands. What I meant to say is that > currently, internal commands are issued only on device scan, device > revalidate and error handling. All of these phases are done with the > device under EH with the issuing path stopped and all commands > completed, If I want to allocate a request for an ATA internal command then could I use 1x from the regular tags? I didn't think that this was possible as I thought that all tags may be outstanding when EH kicks in. I need to double check it. Even if it were true, not using a reserved tag for ATA internal command makes things more tricky as this command requires special handling for scsi blk_mq_ops and there is no easy way to identify the command as reserved (to know special handling is required). >so no regular commands can be issued. Only internal ones, non > NCQ, using the ATA_TAG_INTERNAL. So strictly speaking, we should not > need to reserve that internal tag at all. > Thanks, John