Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1602580rdb; Sun, 8 Oct 2023 16:17:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/yS0aRRjWDImK4HycWhavDBicOwSNzGP1nUOqQ8WNsEDFuMALTECMLZG/SiO64Lidweq9 X-Received: by 2002:a17:90b:1d04:b0:268:808:8e82 with SMTP id on4-20020a17090b1d0400b0026808088e82mr17201189pjb.1.1696807060410; Sun, 08 Oct 2023 16:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696807060; cv=none; d=google.com; s=arc-20160816; b=KxI9GtJmjBSYvQflAT1JFnpYEg+MHwO/Je4fuGmcJzfWfWJu3LPKMHE3xE5gpVCys3 pMgLe1KAMDODk2VM2Bq5U/fFeJEWMmUnVlyodAcmwYgF6Ag6aXonkZ1vJ+LyMW9Eb8Zg bv/oYSlj/jgsXwOKiqo25j7hN6WldvQeuLKOxR5CsKR4UDek627X1nFI5G4sWib02c7P fZxDuF7HeWXgM2vzct0g+H4vMmOLk2rmoY9+wieIEI5LC071htE00O0Ojb+C1LXMIg34 FzhkhppHNN1nhYWjABLD6XtB4R/OOoQJgsKB/CphGRH77NKyPKJAggvHQET1RssSsB70 qljA== 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:reply-to:user-agent :mime-version:date:message-id; bh=E0EjtfcP7p2Ip9Li9ereBqwMQ5UIGWLUIIU2+loQQiQ=; fh=UEpFMKOqyweapDowiE7VvOt2ySza3HVObMQ+Ezn7xQ0=; b=t/pkdMxpXNi9IotyPjzsleudg4JNfDizI807E4BzGSNbi0p5TkbR2K1qIXUj9vyzdy i+MOzDPYAgND5Bekt0IBta9PMnkKYQbqRa4nkQLDnwO7kq9ngOPfgyV+sgq3ZKh5iGko vhg9HII1gCFKt4JhkNtUAUFryjl9ohKJMX+kUd92hvF6EL8mvKj0wtQIDgZ/MBjYDkSA bUA1BM2DTg9yOucz8IJfoUeBJZrouzIg2apJ7hZOqDGGPPj6rY/eu08RK5VaVSU9qMOz 5X7NKstExxfAeXEUEh7KoFOzQKNz4uTcXZjcoQH0Zntb0tiknWYdnar9LXKIVD3nKjeM nctQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id ep4-20020a17090ae64400b002773b2dd112si1586943pjb.54.2023.10.08.16.17.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 16:17:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2E5908047471; Sun, 8 Oct 2023 16:17:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344921AbjJHXRM (ORCPT + 99 others); Sun, 8 Oct 2023 19:17:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344437AbjJHXRL (ORCPT ); Sun, 8 Oct 2023 19:17:11 -0400 Received: from mp-relay-01.fibernetics.ca (mp-relay-01.fibernetics.ca [208.85.217.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B44B69D; Sun, 8 Oct 2023 16:17:10 -0700 (PDT) Received: from mailpool-fe-02.fibernetics.ca (mailpool-fe-02.fibernetics.ca [208.85.217.145]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mp-relay-01.fibernetics.ca (Postfix) with ESMTPS id DA5F8E1947; Sun, 8 Oct 2023 23:17:09 +0000 (UTC) Received: from localhost (mailpool-mx-01.fibernetics.ca [208.85.217.140]) by mailpool-fe-02.fibernetics.ca (Postfix) with ESMTP id C39346091F; Sun, 8 Oct 2023 23:17:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at X-Spam-Score: -0.199 X-Spam-Level: X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 Received: from mailpool-fe-02.fibernetics.ca ([208.85.217.145]) by localhost (mail-mx-01.fibernetics.ca [208.85.217.140]) (amavisd-new, port 10024) with ESMTP id n9tGbeY3WSBp; Sun, 8 Oct 2023 23:17:09 +0000 (UTC) Received: from [192.168.48.17] (host-104-157-209-188.dyn.295.ca [104.157.209.188]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dgilbert@interlog.com) by mail.ca.inter.net (Postfix) with ESMTPSA id B336660455; Sun, 8 Oct 2023 23:17:08 +0000 (UTC) Message-ID: Date: Sun, 8 Oct 2023 19:17:08 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: dgilbert@interlog.com Subject: Re: [PATCH v5 10/10] scsi: scsi_debug: Add param to control sdev's allow_restart Content-Language: en-CA To: Wenchao Hao , "James E . J . Bottomley" , "Martin K . Petersen" , open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, louhongxiang@huawei.com References: <20230922092906.2645265-1-haowenchao2@huawei.com> <20230922092906.2645265-11-haowenchao2@huawei.com> From: Douglas Gilbert In-Reply-To: <20230922092906.2645265-11-haowenchao2@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 08 Oct 2023 16:17:38 -0700 (PDT) X-Spam-Level: ** On 2023-09-22 05:29, Wenchao Hao wrote: > Add new module param "allow_restart" to control if setup > scsi_device's allow_restart flag. This is used to test scsi > command finished with sense_key 0x6, asc 0x4 and ascq 0x2 > > Signed-off-by: Wenchao Hao Hi, Looked at this and verified that the allow_restart flag of scsi_debug devices (disks ?) is usually 0 and when the scsi_debug module is started with allow_restart=1 then the allow_restart flag does indeed change to 1. For example: # cat /sys/class/scsi_disk/1\:0\:0\:0/allow_restart 1 That ASC/ASCQ code means: "Logical unit not ready, initializing command required" according to my library. Played around with sg_start but didn't see any change in how it reacts. According to scsi_device.h that flag's description is: "issue START_UNIT in error handler" which implies it changes how the EH handler reacts. Perhaps the 3 line patch description could say a little more about how to use this new parameter... Tested-by: Douglas Gilbert