Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3166626ybi; Mon, 17 Jun 2019 18:09:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzS07/jUFHyMnJsE7uK2BdcvPyMMxHK5VPaamoJok5pEObb9MjI1b6yjN/nfInVz46MIzZl X-Received: by 2002:a63:905:: with SMTP id 5mr176504pgj.173.1560820185865; Mon, 17 Jun 2019 18:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560820185; cv=none; d=google.com; s=arc-20160816; b=dXVvI/mSUBZ8zYX443Sf4qV+cowy5o+8Z/PBusyg/+R/oCgt9QJdXl6jZtCgELBmWM q7H2rrRjJNm0ixjgUSkprS2AAxUf3YWGG2UElaQ4L7qMkLEAw6LLKYBQvQ9PsABdfDrF eGF9745ZktLg0eX1DZO3hPHZ3W42yFm9lwkc2ddM3UsjezjkWXjlDcsGyZkP03aWZRgO vlGcWYsgSLB1VVGdxgkmtyznrKoiZDUTH3yX1QVJyhZIiBlwnzugvK5lLNWyglwd68qT FUBJ4Ln2Jr5qS4JYvYD46w6lCsMcVbWriOduJA6i9fpDRGnzomYZ4yytqbwJfqLfDPDr lQbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date; bh=+R2MEh0PjvJZ3J7Um+2VwCE1OUhL90QfPa4HQ1UdCe0=; b=FkNDqVpqTAKNtuejCi+D6AUtDhFuaIZMHy0JXwTvX+gLVdiFtkqIz/swP3E/6dpImh Jn7mxDAvr+qOUOQRTqiduAxSdeYO9IRAAJbnJhT/Lvk3sqxWQhDr0q81BUf169+KeCc9 XKdXyQEU8j2XCC1Um6KZFdGSmC0cv447076rXRpGqnXHK/ZUz77HRApDcfWgaKahRJKU qIw0V1/a6n0HORJxEtEA5euI8YmSyAqC4CE/8nj6DDL0e7fE0MBYIP0oFlAOJgUJmOuP 4YOS1YTBd2YkHuiZPW8IlceBGKeDZW3JMKrbslDLVHvdxd4HCPdgvt8DS536F5e1GnzL Bwew== 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 k33si11529427pld.359.2019.06.17.18.09.30; Mon, 17 Jun 2019 18:09:45 -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 S1726783AbfFRBH5 (ORCPT + 99 others); Mon, 17 Jun 2019 21:07:57 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:34586 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725829AbfFRBH5 (ORCPT ); Mon, 17 Jun 2019 21:07:57 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by kvm5.telegraphics.com.au (Postfix) with ESMTP id C87BF29544; Mon, 17 Jun 2019 21:07:52 -0400 (EDT) Date: Tue, 18 Jun 2019 11:08:03 +1000 (AEST) From: Finn Thain To: Douglas Gilbert cc: Bart Van Assche , Marc Gonzalez , James Bottomley , Martin Petersen , SCSI , LKML , Christoph Hellwig Subject: Re: [PATCH v1] scsi: Don't select SCSI_PROC_FS by default In-Reply-To: Message-ID: References: <2de15293-b9be-4d41-bc67-a69417f27f7a@free.fr> <621306ee-7ab6-9cd2-e934-94b3d6d731fc@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 Jun 2019, Douglas Gilbert wrote: > On 2019-06-17 5:11 p.m., Bart Van Assche wrote: > > On 6/12/19 6:59 AM, Marc Gonzalez wrote: > > > According to the option's help message, SCSI_PROC_FS has been > > > superseded for ~15 years. Don't select it by default anymore. > > > > > > Signed-off-by: Marc Gonzalez > > > --- > > > drivers/scsi/Kconfig | 3 --- > > > 1 file changed, 3 deletions(-) > > > > > > diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig > > > index 73bce9b6d037..8c95e9ad6470 100644 > > > --- a/drivers/scsi/Kconfig > > > +++ b/drivers/scsi/Kconfig > > > @@ -54,14 +54,11 @@ config SCSI_NETLINK > > > config SCSI_PROC_FS > > > bool "legacy /proc/scsi/ support" > > > depends on SCSI && PROC_FS > > > - default y > > > ---help--- > > > This option enables support for the various files in > > > /proc/scsi. In Linux 2.6 this has been superseded by > > > files in sysfs but many legacy applications rely on this. > > > - If unsure say Y. > > > - > > > comment "SCSI support type (disk, tape, CD-ROM)" > > > depends on SCSI > > > > Hi Doug, > > > > If I run grep "/proc/scsi" over the sg3_utils source code then grep reports > > 38 matches for that string. Does sg3_utils break with SCSI_PROC_FS=n? > > First, the sg driver. If placing > #undef CONFIG_SCSI_PROC_FS > > prior to the includes in sg.c is a valid way to test that then the > answer is no. Ah, but you are talking about sg3_utils . > > Or are you? 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. Those 6 are all for direct IO > (see below) which is off by default. I suspect old scanning > utilities like sg_scan and sg_map might also use /proc/scsi/* . > That is one reason why I wrote lsscsi. However I can't force folks > to use lsscsi. As a related example, I still get bug reports for > sginfo which I inherited from Eric Youngdale. > > If I was asked to debug a problem with the sg driver in a > system without CONFIG_SCSI_PROC_FS defined, I would decline. > > The absence of /proc/scsi/sg/debug would be my issue. Can this > be set up to do the same thing: > cat /sys/class/scsi_generic/debug > Is that breaking any sysfs rules? > > > Also folks who rely on this to work: > cat /proc/scsi/sg/devices > 0 0 0 0 0 1 255 0 1 > 0 0 0 1 0 1 255 0 1 > 0 0 0 2 0 1 255 0 1 > > would be disappointed. Further I note that setting allow_dio via > /proc/scsi/sg/allow_dio can also be done via /sys/module/sg/allow_dio . > So that would be an interface breakage, but with an alternative. > > Doug Gilbert > You can grep for /proc/scsi/ across all Debian packages: https://codesearch.debian.net/ This reveals that /proc/scsi/sg/ appears in smartmontools and other packages, for example. --