Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4928344rwb; Sun, 13 Nov 2022 17:24:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf6blsbhdDnS4sGm4CvEwKflN0/EfGO3JP/v7fKRYWQOTddMoxpEa0+431scLGlqwseeqYJ0 X-Received: by 2002:a17:90a:d982:b0:213:e8b5:2d50 with SMTP id d2-20020a17090ad98200b00213e8b52d50mr11693289pjv.211.1668389084939; Sun, 13 Nov 2022 17:24:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668389084; cv=none; d=google.com; s=arc-20160816; b=Axdmar1tirU3ePKtC29m/Kj5nTWJUnFuVhkInFiPty+ZC+GtFHq3x3xlHDfX6c1d43 /bp/vQSuyTWLsqhTTYMrVv1qDISo8c2LUXx9DvtyYH5ViS9JzYLaDDqlzIrG5Y63Kvs5 b42dECPgKi33ZTHY5ntxIdfbQ1JOZCXygvjH/X6w+IMmqReIzgzdwydBpD0LBVd5jr0g erPbGLK+lOYcWLSaySw7F9Zs8xdclQzuU+5lz/Ge2duRp06qo0Stlzs9L9XOmcvVYVlL 86Ak8y5ElaC28kDSAxn+IWSYetqZPt/EVH7MlJQV2/v3Uw6o8DhhUYj8SpMLPdtFNEAO awgg== 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 :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature :wdcironportexception:ironport-sdr:ironport-sdr:dkim-signature; bh=KciglA9rfQJ8KcHlucaPs1LRhbYE2EuL7hnOdh0XwsU=; b=j4QCQa6UB6fdFwu7z0physbkBm7VzjdM+K1Yxay2hvOzfY3aO5VFb09+zuwzzPJejE /U8xU9o1onrr6U4Ngo9XZIy2tmq7yBEWpSu+qLvmfYiR/zV5PrpJ8s5VWza6M7ecqODq EZ4zyQEf+J9KImCBBWRHdbIOG495cLqCPQoWV4nccmfu3IWWEzbPlExOYtyM5nQRI0cD QEgyEXxKRrlQNUq6VhEYkqNOeSRp3VlSiPzMiKtaZwTqJ7BDaG9o9+8bpxXWdQOJR1A/ TDBotyuL94E+SvZzji0AvuytqFZJJfObhS0kjhA45PdRldh/RgNF5UxwH68zhl7Hv5xs LX+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Gf6HX6Sn; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=ODURWQ2H; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lw14-20020a17090b180e00b0020d47757829si8008836pjb.144.2022.11.13.17.24.33; Sun, 13 Nov 2022 17:24:44 -0800 (PST) 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; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Gf6HX6Sn; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=ODURWQ2H; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235625AbiKNAbL (ORCPT + 89 others); Sun, 13 Nov 2022 19:31:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235618AbiKNAbJ (ORCPT ); Sun, 13 Nov 2022 19:31:09 -0500 Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67924E02C for ; Sun, 13 Nov 2022 16:31:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1668385868; x=1699921868; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=9oWrSfpX2WhFznUHJBIRODGa7XS9CCGLZvVqGFg8LeY=; b=Gf6HX6SnxmE++hW4PiHAtioW6Bi40fgNWS1PxgxyziwhxFFhKa1tMS5V u/cFTzPVTi/WvLJO8Ql5NWZxDFsagIZJyCJAr1n0dxBJJWMEPG2RpQ+hO FXYxnOU8CCD27mv3hgeOq4tgnxaO6iEJJlwJ+VepVLZWQiMEgGhFFrtnY oZ0tIc6ZxXnvA+ABghm2xKauWN4/255N6yLGYfBzqxkgHlqiZaL80r/HY WGZe8qx43Yi+3od39ZsAVFeUuor2AKeF0RrhAOj+0YUyyEQxbE78sez1+ XMXwSHEzAyOLsj0NKpTIJpXzzqi31vq4VrKwqzZuRmiWReMjVgybipbuD g==; X-IronPort-AV: E=Sophos;i="5.96,161,1665417600"; d="scan'208";a="328273382" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 14 Nov 2022 08:31:02 +0800 IronPort-SDR: y8XEENLI3PYfRdO+xPHLEilTq7nmSw8TlPZhLNdZx4wpyX7CF+mCfjHr6pUo5LAULVs+8sVDfx fNa54kaotiZHMW+1KIc6+0+3ONr+JvLuyMrbEoxzGcVp0mXYx7kM3TrMFXz2U5rGv4ieZJ9Fx4 h6gyVD/eyIZlZ+djoHFEWt0LS5UPB8x9VJol9K1yGNmI4MzbMDOYiV3+cELgcG1v4WHpwq9S4B jfUs9YGxV5tN1eenvw7Ey+3mPAJJ3N5Res4y/tn8u39siMZY2SjbnKaUFIFV+i8K8Pu9jl4h9/ Kng= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 13 Nov 2022 15:44:16 -0800 IronPort-SDR: 5HmcQCsd89CoSBRIlRkDg1oB6tKpKwuB94xvnBJTn6FBSEj5V8MoWFVbiJtL/awTnKL9A63ZEP RyJm+uIK1AXE0tevRWTxzXcdUtjSW2gzEb2oZCufWQh6f+Z92fAfHZ8XAmg7wIocfGVnrGUEEh NawmabjkZhAaRP2rD/NFriXckIFrB8grKOCJyaeBPt0dgsYBozQzkDwQ7hmuKpUjZH2L4fDg5m 92afxOvu+fgvAH+zuyO5fN7UtOEgdG8Uw/elwx+ZMtTnmEkcks9thE9YF01tKKhMyUS6KPkcsk TJs= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 13 Nov 2022 16:31:02 -0800 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4N9VbV0G2mz1Rwrq for ; Sun, 13 Nov 2022 16:31:02 -0800 (PST) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1668385861; x=1670977862; bh=9oWrSfpX2WhFznUHJBIRODGa7XS9CCGLZvV qGFg8LeY=; b=ODURWQ2HqMc8SoKgM3XIXwlmdDgw0kL/yiVzMlyJlpJPEPkl0Gq 7My87Rs57Q2DcTZ5+7lN5cOPGl8QprbL4zM2rckGeiEJ24DdcUlnGaGxb9JIysGJ IlzNajY8CE85f/90gKfCwC/gL0AB/0KvRDN2h4VdpAUihF2llAOY1LggMzdk9krn ngYAzVQBa6WlbV1BKGcnJ8ULy6DE4ARjhffV4Rf0BiRQXGI1vBX1J1WOAWXyFKFD BG4xN68wgQfEzUbc6FJYsIh65LcPnsV0K518Ajcq+sScphdvxH0ol2fkYYB3IKxC 4PolO/CwVlp1HdWzWPDPAJtZJ3Nx9nDo5mw== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kqzd5PPG1c2G for ; Sun, 13 Nov 2022 16:31:01 -0800 (PST) Received: from [10.225.163.46] (unknown [10.225.163.46]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4N9VbS38tCz1RvLy; Sun, 13 Nov 2022 16:31:00 -0800 (PST) Message-ID: <50e1411a-54c4-d9d2-7567-2388219c5bb1@opensource.wdc.com> Date: Mon, 14 Nov 2022 09:30:58 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [RFC PATCH 0/5] scsi:scsi_debug:Add error injection for single lun Content-Language: en-US To: dgilbert@interlog.com, Wenchao Hao , "James E . J . Bottomley" , "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221109155950.3536976-1-haowenchao@huawei.com> <58472d12-c1e4-59f3-bb37-a98db17ef2ba@interlog.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <58472d12-c1e4-59f3-bb37-a98db17ef2ba@interlog.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 11/14/22 06:48, Douglas Gilbert wrote: > On 2022-11-09 10:59, Wenchao Hao wrote: >> The original error injection mechanism was based on scsi_host which >> could not inject fault for a single SCSI device. >> >> This patchset provides the ability to inject errors for a single >> SCSI device. Now we supports inject timeout errors, queuecommand >> errors, and hostbyte, driverbyte, statusbyte, and sense data for >> specific SCSI Command >> >> The first patch add an sysfs interface to add and inquiry single >> device's error injection info; the second patch defined how to remove >> an injection which has been added. The following 3 patches use the >> injection info and generate the related error type. >> >> Wenchao Hao (5): >> scsi:scsi_debug: Add sysfs interface to manager single devices' error inject >> scsi:scsi_debug: Add interface to remove injection which has been added >> scsi:scsi_debug: make command timeout if timeout error is injected >> scsi:scsi_debug: Return failed value for specific command's queuecommand >> scsi:scsi_debug: fail specific scsi command with result and sense data >> >> drivers/scsi/scsi_debug.c | 295 ++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 295 insertions(+) > > Hi, > This patchset seems to assume all scsi_debug devices will be disk (-like) SCSI > devices. That leaves out other device types: tapes, enclosures, WLUNs, etc. > > Have you considered putting these device specific additions under: > /sys/class/scsi_device//device/error_inject/ > instead of > /sys/block/sdb/device/error_inject/ But these are the same, no ? At least on my Fedora box, I see: /sys/block/sdp/device/ being /sys/devices/pseudo_0/adapter0/host19/target19:0:0/19:0:0:0 and /sys/class/scsi_device/19:0:0:0/device being /sys/devices/pseudo_0/adapter0/host19/target19:0:0/19:0:0:0 > > ? > > Doug Gilbert > > > -- Damien Le Moal Western Digital Research