On 1/27/22 18:28, Bart Van Assche wrote:
On 1/25/22 08:24, mwilck@xxxxxxxx wrote:
From: Martin Wilck <mwilck@xxxxxxxx>
If a SCSI device handler module is loaded after some SCSI devices
have already been probed (e.g. via request_module() by dm-multipath),
the "access_state" and "preferred_path" sysfs attributes remain
invisible for
these devices, although the handler is attached and live. The reason is
that the visibility is only checked when the sysfs attribute group is
first created. This results in an inconsistent user experience depending
on the load order of SCSI low-level drivers vs. device handler modules.
Isn't this something that should be fixed in the sysfs code rather than
in the SCSI core? If this issue affects SCSI I assume that it will also
affect other sysfs users.
Urgh.
Rather not.
That particular code affects the visibility of sysfs attributes; they
are created statically in device_add(), so it won't even be created if
it's not visible.
Reworking that would mean a rework of the entire drivers/base code.
And not to mention a change in behaviour, as some drivers might well
rely on the current behaviour.
But if you feel up to it ...
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer