Re: [PATCH] scsi: hisi_sas: display correct proc_name in sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/05/2020 10:35, Jason Yan wrote:


在 2020/5/12 16:23, John Garry 写道:
On 12/05/2020 07:33, Jason Yan wrote:
The 'proc_name' entry in sysfs for hisi_sas is 'null' now becuase it is
not initialized in scsi_host_template. It looks like:

[root@localhost ~]# cat /sys/class/scsi_host/host2/proc_name
(null)


hmmm.. it would be good to tell us what this buys us, apart from the proc_name file.


When there is more than one storage cards(or controllers) in the system, I'm tring to find out which host is belong to which card. And then I found this in scsi_host in sysfs but the output is '(null)' which is odd.

"dmesg | grep host" would give this info, like:

root@(none)$ dmesg | grep host0
[    8.877245] scsi host0: hisi_sas_v2_hw


I mean, if we had the sht show_info method implemented, then it could be useful (which is even marked as obsolete now).


I found this is interesting while in the sysfs filesystem we have a procfs stuff in it.

It's only the name of the procfs entry, if it exists.

And, since .show_info is obsolete, I don't see why .proc_name is not also obsolete.

I was planned to rename this entry to 'name' and use the struct member 'name' directly in struct scsi_host_template. But this may break userspace applications.


Thanks,
John



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux