sysfs attributes of SCSI hosts

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

 



Hello,

Recently I had a closer look at how SCSI host sysfs attributes are
created. As far as I can see the attributes that apply to all SCSI
hosts are declared in the scsi_sdev_attrs array in
drivers/scsi_sysfs.c (device_blocked, type, scsi_level, vendor, model,
...). These are created by the driver core before the KOBJ_ADD event
is generated. However, the driver-specific attributes defined in
scsi_host_template.shost_attrs are instantiated by the
scsi_sysfs_add_sdev() function by invoking device_create_file() after
the KOBJ_ADD event has been generated.

A popular way to set default values for sysfs attributes is by
defining a udev rule that sets the proper value. As an example, years
ago the following rules were present in 50-udev-default.rules:

SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*",ACTION=="add",
ATTR{type}=="0|7|14", ATTR{timeout}="60"
SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*",ACTION=="add",
ATTR{type}=="1", ATTR{timeout}="900"

Does that mean that udev rules similar to the above will work for
setting the value of the default SCSI host attributes but that any
attempt to use a similar rule for any attribute defined via
shost_attrs is racy ? Has anyone been looking into this before ?

Thanks,

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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