Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3044998ybi; Fri, 5 Jul 2019 00:53:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/qDPMVk6ftCuODyAQ6MIjuGhnfsuBL7zt5zI/JUvE9URhzUrfSW1Di1Q1WORqak11zYzC X-Received: by 2002:a63:b904:: with SMTP id z4mr3532769pge.388.1562313181828; Fri, 05 Jul 2019 00:53:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562313181; cv=none; d=google.com; s=arc-20160816; b=Gew6jXp1qaIlLhFERUiZUohjDHK8uoS/MksRPbh1EC7KAqkmmjqodjurqfpB+uRIIH RU3dyaExfVQjW++LQGC8DRPRf6hciWiePqXkBzJ26zjhtBZu80HbSItG8wNZrhHkkvGU Yq3Lnjwr0FyQTj+svsYPdzSYdOcHRRjx80ePwDa3Xqh3iORnTxaAiLjQswLMJOEaVfmN hDI8lxk8jQgdBCG9I+HG/Ng84/8creHPwtvhdDKZmFM4G1dkxN0PyAcprFGv627o0H6B l3jZLm3fRSzaQFyGrG+a0YIqHddrzkhLPpcAsyRuDCi2r60ewAo0ILikOVCLMfnsxHlg uQNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=RYXyzeURgwLpwSUxGupHGHXfq2HeYbXswzmxI5nt1wo=; b=xFbFs76OToRMcKEqrF4Ii23ZS7mt22B8tfCHhh739ymzWHuydcUzO33ifBUWhPdL76 HMf3G+6urJwsQbp8wV45aJA7Mah6R2JWOczEhrYJgog0v1oIF46ZwkrRQE8UD2lxFs6Y XZA2JBoMXnSjdxF6CuVAB5XhA9+Dz9vokB5hzcfsqcFPEc9nshJfBTpoWIt5ZJezKvNd TLcoHbS6NQTrFWSnpLGinRDLjfLCG32yOguxJL3xpcxvCDfC/BsnDq6XvmkDKotMOjpc XD2CnEBM5vqx3IuxbaqiaDWMNuvvryIf1uYacCpp7IF/Kq9GlUobjEKXywt75XOXUDwc bSSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11si7966359pgj.537.2019.07.05.00.52.47; Fri, 05 Jul 2019 00:53:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727903AbfGEHWr (ORCPT + 99 others); Fri, 5 Jul 2019 03:22:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:57912 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725894AbfGEHWq (ORCPT ); Fri, 5 Jul 2019 03:22:46 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9CD5BAFA9; Fri, 5 Jul 2019 07:22:43 +0000 (UTC) Subject: Re: [PATCH v1] scsi: Don't select SCSI_PROC_FS by default To: "Elliott, Robert (Servers)" , Bart Van Assche , "dgilbert@interlog.com" , Marc Gonzalez , James Bottomley , Martin Petersen Cc: SCSI , LKML , Christoph Hellwig References: <2de15293-b9be-4d41-bc67-a69417f27f7a@free.fr> <621306ee-7ab6-9cd2-e934-94b3d6d731fc@acm.org> From: Hannes Reinecke Openpgp: preference=signencrypt Autocrypt: addr=hare@suse.de; prefer-encrypt=mutual; keydata= mQIN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kzqNAXn5Onx/b0rFGFpM4GmSPriEJdBb4M4pSD6fN6Y/Jrng/Bdwk SQARAQABiQIlBBgBAgAPBQJOiskRAhsMBQkSzAMAAAoJEGz4yi9OyKjPgEwQAIP/gy/Xqc1q OpzfFScswk3CEoZWSqHxn/fZasa4IzkwhTUmukuIvRew+BzwvrTxhHcz9qQ8hX7iDPTZBcUt ovWPxz+3XfbGqE+q0JunlIsP4N+K/I10nyoGdoFpMFMfDnAiMUiUatHRf9Wsif/nT6oRiPNJ T0EbbeSyIYe+ZOMFfZBVGPqBCbe8YMI+JiZeez8L9JtegxQ6O3EMQ//1eoPJ5mv5lWXLFQfx f4rAcKseM8DE6xs1+1AIsSIG6H+EE3tVm+GdCkBaVAZo2VMVapx9k8RMSlW7vlGEQsHtI0FT c1XNOCGjaP4ITYUiOpfkh+N0nUZVRTxWnJqVPGZ2Nt7xCk7eoJWTSMWmodFlsKSgfblXVfdM 9qoNScM3u0b9iYYuw/ijZ7VtYXFuQdh0XMM/V6zFrLnnhNmg0pnK6hO1LUgZlrxHwLZk5X8F uD/0MCbPmsYUMHPuJd5dSLUFTlejVXIbKTSAMd0tDSP5Ms8Ds84z5eHreiy1ijatqRFWFJRp ZtWlhGRERnDH17PUXDglsOA08HCls0PHx8itYsjYCAyETlxlLApXWdVl9YVwbQpQ+i693t/Y PGu8jotn0++P19d3JwXW8t6TVvBIQ1dRZHx1IxGLMn+CkDJMOmHAUMWTAXX2rf5tUjas8/v2 azzYF4VRJsdl+d0MCaSy8mUh Message-ID: <1ad3e7ba-008d-31ad-89a0-b118b36e14e2@suse.de> Date: Fri, 5 Jul 2019 09:22:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/18/19 7:43 PM, Elliott, Robert (Servers) wrote: > > >> -----Original Message----- >> From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Bart >> Van Assche >> Sent: Monday, June 17, 2019 10:28 PM >> To: dgilbert@interlog.com; Marc Gonzalez ; James Bottomley >> ; Martin Petersen >> Cc: SCSI ; LKML ; Christoph Hellwig >> >> Subject: Re: [PATCH v1] scsi: Don't select SCSI_PROC_FS by default >> >> On 6/17/19 5:35 PM, Douglas Gilbert wrote: >>> For sg3_utils: >>> >>> $ find . -name '*.c' -exec grep "/proc/scsi" {} \; -print >>> static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio"; >>> ./src/sg_read.c >>> static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio"; >>> ./src/sgp_dd.c >>> static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio"; >>> ./src/sgm_dd.c >>> static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio"; >>> ./src/sg_dd.c >>>                 "'echo 1 > /proc/scsi/sg/allow_dio'\n", q_len, >>> dirio_count); >>> ./testing/sg_tst_bidi.c >>> static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio"; >>> ./examples/sgq_dd.c >>> >>> That is 6 (not 38) by my count. >> >> Hi Doug, >> >> This is the command I ran: >> >> $ git grep /proc/scsi | wc -l >> 38 >> >> I think your query excludes scripts/rescan-scsi-bus.sh. >> >> Bart. > > Here's the full list to ensure the discussion doesn't overlook anything: > > sg3_utils-1.44$ grep -R /proc/scsi . > ./src/sg_read.c:static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio"; > ./src/sgp_dd.c:static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio"; > ./src/sgm_dd.c:static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio"; > ./src/sg_dd.c:static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio"; > ./scripts/rescan-scsi-bus.sh:# Return hosts. /proc/scsi/HOSTADAPTER/? must exist > ./scripts/rescan-scsi-bus.sh: for driverdir in /proc/scsi/*; do > ./scripts/rescan-scsi-bus.sh: driver=${driverdir#/proc/scsi/} > ./scripts/rescan-scsi-bus.sh: name=${hostdir#/proc/scsi/*/} > ./scripts/rescan-scsi-bus.sh:# Get /proc/scsi/scsi info for device $host:$channel:$id:$lun > ./scripts/rescan-scsi-bus.sh: SCSISTR=$(grep -A "$LN" -e "$grepstr" /proc/scsi/scsi) > ./scripts/rescan-scsi-bus.sh: DRV=`grep 'Attached drivers:' /proc/scsi/scsi 2>/dev/null` > ./scripts/rescan-scsi-bus.sh: echo "scsi report-devs 1" >/proc/scsi/scsi > ./scripts/rescan-scsi-bus.sh: DRV=`grep 'Attached drivers:' /proc/scsi/scsi 2>/dev/null` > ./scripts/rescan-scsi-bus.sh: echo "scsi report-devs 0" >/proc/scsi/scsi > ./scripts/rescan-scsi-bus.sh:# Outputs description from /proc/scsi/scsi (unless arg passed) > ./scripts/rescan-scsi-bus.sh: echo "scsi remove-single-device $devnr" > /proc/scsi/scsi > ./scripts/rescan-scsi-bus.sh: echo "scsi add-single-device $devnr" > /proc/scsi/scsi > ./scripts/rescan-scsi-bus.sh: echo "scsi add-single-device $devnr" > /proc/scsi/scsi > ./scripts/rescan-scsi-bus.sh: echo "scsi add-single-device $devnr" > /proc/scsi/scsi > ./scripts/rescan-scsi-bus.sh: echo "scsi add-single-device $host $channel $id $SCAN_WILD_CARD" > /proc/scsi/scsi > ./scripts/rescan-scsi-bus.sh:if test ! -d /sys/class/scsi_host/ -a ! -d /proc/scsi/; then > ./ChangeLog: /proc/scsi/sg/allow_dio is '0' > ./ChangeLog: - change sg_debug to call system("cat /proc/scsi/sg/debug"); > ./suse/sg3_utils.changes: * Support systems without /proc/scsi > ./examples/sgq_dd.c:static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio"; > ./doc/sg_read.8:If direct IO is selected and /proc/scsi/sg/allow_dio > ./doc/sg_read.8:"echo 1 > /proc/scsi/sg/allow_dio". An alternate way to avoid the > ./doc/sg_map.8:observing the output of the command: "cat /proc/scsi/scsi". > ./doc/sgp_dd.8:at completion. If direct IO is selected and /proc/scsi/sg/allow_dio > ./doc/sgp_dd.8:this at completion. If direct IO is selected and /proc/scsi/sg/allow_dio > ./doc/sgp_dd.8:mapping to SCSI block devices should be checked with 'cat /proc/scsi/scsi' > ./doc/sg_dd.8:notes this at completion. If direct IO is selected and /proc/scsi/sg/allow_dio > ./doc/sg_dd.8:this at completion. If direct IO is selected and /proc/scsi/sg/allow_dio > ./doc/sg_dd.8:with 'echo 1 > /proc/scsi/sg/allow_dio'. > ./doc/sg_dd.8:mapping to SCSI block devices should be checked with 'cat /proc/scsi/scsi', > > As mentioned, rescan-scsi-bus.sh is keeping references to /proc/scsi as a fall back only, as it's meant to work kernel independent. Per default it'll be using /sys, and will happily work without /proc/scsi. So it's really only /proc/scsi/sg which carries some meaningful information; maybe we should move/copy it to somewhere else. I personally like getting rid of /proc/scsi. Cheers, -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg)