[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <726c8764-c3fe-99d9-d2ea-6a4ab8a198d5@interlog.com>
Date: Tue, 26 Apr 2022 21:47:47 -0400
From: Douglas Gilbert <dgilbert@...erlog.com>
To: Bart Van Assche <bvanassche@....org>,
John Garry <john.garry@...wei.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Christoph Hellwig <hch@...radead.org>
Cc: "Ewan D. Milne" <emilne@...hat.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Alim Akhtar <alim.akhtar@...sung.com>,
Avri Altman <avri.altman@....com>, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, james.smart@...adcom.com
Subject: Re: [PATCH 1/4] scsi: core: constify pointer to scsi_host_template
On 2022-04-26 00:13, Bart Van Assche wrote:
> On 4/25/22 18:54, Douglas Gilbert wrote:
>> On 2022-04-25 21:16, Bart Van Assche wrote:
>>> How about removing scsi_proc_hostdir_add(), scsi_proc_hostdir_rm() and all
>>> other code that creates files or directories under /proc/scsi? There should
>>> be corresponding entries in sysfs for all /proc/scsi entries. Some tools in
>>> sg3_utils use that directory so sg3_utils will have to be updated.
>>
>> ... breaking this:
>>
>> ~$ cat /proc/scsi/scsi
>>
>> Attached devices:
>>
>> Host: scsi3 Channel: 00 Id: 00 Lun: 00
>> Vendor: IBM-207x Model: HUSMM8020ASS20 Rev: J4B6
>> Type: Direct-Access ANSI SCSI revision: 06
>> Host: scsi3 Channel: 00 Id: 01 Lun: 00
>> Vendor: IBM-207x Model: HUSMM8020ASS20 Rev: J4B6
>> Type: Direct-Access ANSI SCSI revision: 06
>> Host: scsi3 Channel: 00 Id: 02 Lun: 00
>> Vendor: SEAGATE Model: ST200FM0073 Rev: 0007
>> Type: Direct-Access ANSI SCSI revision: 06
>> ...
>>
>> A deprecation notice would be helpful, then removal after a few kernel
>> cycles.
>
> Agreed with the deprecation notice + delayed removal, but is anyone using cat
> /proc/scsi/scsi?
>
>> Yes, lsscsi can give that output:
>>
>> $ lsscsi -c
>> Attached devices:
>> Host: scsi2 Channel: 00 Target: 00 Lun: 00
>> Vendor: SEAGATE Model: ST200FM0073 Rev: 0007
>> Type: Direct-Access ANSI SCSI revision: 06
>> Host: scsi2 Channel: 00 Target: 01 Lun: 00
>> Vendor: WDC Model: WSH722020AL5204 Rev: C421
>> Type: Zoned Block ANSI SCSI revision: 07
>> Host: scsi2 Channel: 00 Target: 02 Lun: 00
>> Vendor: Areca Te Model: ARC-802801.37.69 Rev: 0137
>> Type: Enclosure ANSI SCSI revision: 05
>> ...
>>
>> [Hmmm, in a different order.]
>>
>> However no distribution that I'm aware of includes lsscsi in its installation.
>> [Most recent example: Ubuntu 22.04]
>
> Hmm ... are you sure? Last time I looked into this an lsscsi package was
> available for every distro I tried (RHEL, SLES, Debian and openSUSE). See also
> https://packages.debian.org/search?searchon=contents&keywords=lsscsi&mode=path&suite=stable&arch=any.
I was talking about the _initial_ installation. When I install new versions
of Fedora or Ubuntu, or play with a "live" CD (usually a USB stick) one
of the first things I do is get a terminal and then invoke 'lsscsi'.
Invariably that second step fails. And on a "live" USB stick you can install
lsscsi but the next time you use it, lsscsi is gone because those "live"
USB sticks hardly ever have persistent storage set up. [Why not? ..
typically the rest of the storage on such a USB stick is un-utilized.]
> Are there other utilities in sg3_utils that would break if the /proc/scsi
> directory would be removed?
>
> $ cd sg3_utils && git grep /proc/scsi | wc -l
> 51
Most of those are in the scripts/rescan-scsi-bus.sh which, judging from the
number of patches and additions it gets, has quite a bit of use out there.
The rest are in my dd variants that are mainly setting /proc/scsi/sg/allow_dio
which has no effect in my sg driver rewrite.
Doug Gilbert
Powered by blists - more mailing lists