Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3637242rwi; Fri, 21 Oct 2022 20:32:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM723lS50QQ49NeAbiCdLop/6u8IceDRADN26xf7Im01CbwHU3GbmlP9T7rGbZJ+Z+WsJXSN X-Received: by 2002:a17:90a:1a43:b0:20a:ea98:b962 with SMTP id 3-20020a17090a1a4300b0020aea98b962mr61499306pjl.118.1666409558661; Fri, 21 Oct 2022 20:32:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666409558; cv=none; d=google.com; s=arc-20160816; b=vUX1HanQItCzPL2Ry5Pqzb3E+wGbw2saSndfeFgGNuVnB8wSNe07F7BRyTRSArmGjd 5IKp+UMyMftdZq8pYC+/g7vGSQMGHXL1+ZcPdEKqMHFK97SXAYPqBylDSGu2bSZ3DP1F hTNykLdI1vjG8LXsu2JfXqhHxS4Sm957yCx/dYoKt+lcjvCf2yMG3mrTfxV68Hxf8APY DS0y9VCGqB2ElPAHlPiZ7IDcFVemlIdQUhKOUjPeJ8S6q92Qj6BOH0qIrUGtfccQBSI0 UyNyBJT9NhkgQfrvQLqjkj7wXcwbOCJCnIZCuHsfvtmLf7iColfhG4W8b9ERjdMp7NkA 8QdQ== 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:content-language:subject:user-agent:mime-version :date:message-id; bh=FVqL3CWeVbfvirmPN25vU/lOPd22C+n0U50qSnYgAzk=; b=XOUoiigQBnOyiD7D0N9YCxX6O/oav15w7gzfQE5pDyk7mvFPFeM8JFbxaogjK5jK1/ E7LTtdILpriJm2tl2ArdTu+luCCVggg/zxgsbadjAl+zD7TS2W2Otjpglkllc9HaISqm PRFNRgolyOMZ+pPn+9sWEISE0jaqAxE7dg9gG9o79JuPiTrCyE4Hfq8ojl51gZtI8X8a Rkj75T5eU6lC72KOTkWPh/Lq3bOWsEP2UAmIpDfptxGV5zYMzaMzDUZSb1DI2aGt+g3C 09Cs3/xnbHuJozUHqKUPt6nfpWB4ruPh6CgZc+9I3IEAKjD8UoXbsmHEZkcec34FtYnR gBEw== 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 k15-20020a170902d58f00b00176806795b7si26674785plh.351.2022.10.21.20.32.26; Fri, 21 Oct 2022 20:32:38 -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 S229792AbiJVCwL (ORCPT + 99 others); Fri, 21 Oct 2022 22:52:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbiJVCwJ (ORCPT ); Fri, 21 Oct 2022 22:52:09 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1C2028F248; Fri, 21 Oct 2022 19:52:07 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MvQjS63D6zVhlf; Sat, 22 Oct 2022 10:47:24 +0800 (CST) Received: from dggpemm500012.china.huawei.com (7.185.36.89) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 22 Oct 2022 10:52:05 +0800 Received: from [10.67.101.126] (10.67.101.126) by dggpemm500012.china.huawei.com (7.185.36.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 22 Oct 2022 10:52:05 +0800 Message-ID: <106d4377-1ba6-7970-b930-de3d766f3dd9@huawei.com> Date: Sat, 22 Oct 2022 10:52:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH] scsi: sd: Update dix config everytime sd_revalidate_disk is called Content-Language: en-CA To: "Martin K. Petersen" CC: , , , , , , References: <20221019081825.20794-1-yangxingui@huawei.com> From: yangxingui In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.101.126] X-ClientProxiedBy: dggpemm100004.china.huawei.com (7.185.36.189) To dggpemm500012.china.huawei.com (7.185.36.89) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 2022/10/20 8:18, Martin K. Petersen wrote: > Xingui, > >> When the host protection capabilities are 0x77 and a DIF disk is >> connected, the DIX and DIF of the disk are default enabled. Then if >> that DIF disk is reformatted as a non-DIF format, per the currently >> flow, the DIX is kept enabled which is not correct > DIX is orthogonal to DIF and a host property. DIX should not be disabled > just because the disk is no longer formatted with protection > information. As the host protection capabilities are 0x77 and not support DIX between OS and HBA only. If write command is delivered to a non-DIF disk with DIX format this time, I/Os will be failed. DIX status should  be updated when the disk DIF type changes. > > That said, your patch is probably fine. I'll take a closer look > tomorrow. ok, thanks. Xingui >