Gerard Beekmans wrote:
> The problem is not "how" (which is already dealt with), but "why". I.e.,
one could say that some sysfs attributes for SCSI devices are created
after the uevent is sent. That's why we have the WAIT_FOR_SYSFS rule
that waits for "ioerr_cnt".
But it will be certainly better to show where exactly this takes place
(i.e., the scsi_sysfs_add_sdev() function from
drivers/scsi/scsi_sysfs.c). This function, in its very end, creates
all sysfs attributes listed in the scsi_sysfs_sdev_attrs[] array. Upon
examining the contents of that array, it is clearly seen that the
"ioerr_cnt" is really the last attribute created.
The "why" can be taken too far.
Indeed, it is not completely suitable for the LFS book (that's why a separate
book has been proposed by Ag). My point is:
1) LFS should provide a working "how"
2) LFS editors should know enough of "why" not to break the "how" in the future
(e.g., should have enough information to judge when workarounds such as
WAIT_FOR_SYSFS rules become unneeded)
Is understanding the
scsi_sysfs_add_sdev() function really of interest to most people? I
don't think most of us care to know the programming internals of the
Linux kernel to that degree. I wager to say that most people just like
to know when/why devices are created, but it sounds like this may be
going too in depth.
Correct for readers, but not for editors.
--
Alexander E. Patrakov
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page