5d01277f59
using a driver-supplied sbuf for printing device discovery announcements. This helps ensure that messages to the console will be properly serialized (through sbuf_putbuf) and not be truncated and interleaved with other messages. The infrastructure mirrors the existing xpt_announce_periph() entry point and is opt-in for now. No content or formatting changes are visible to the operator other than the new coherency. While here, eliminate the stack usage of the temporary announcement buffer in some of the drivers. It's moved to the softc for now, but future work will eliminate it entirely by making the code flow more linear. Future work will also address locking so that the sbufs can be dynamically sized. The scsi_da, scs_cd, scsi_ses, and ata_da drivers are converted at this point, other drivers can be converted at a later date. A tunable+sysctl, kern.cam.announce_nosbuf, exists for testing purposes but will be removed later. TODO: Eliminate all of the code duplication and temporary buffers. The old printf-based methods will be retired, and xpt_announce_periph() will just be a wrapper that uses a dynamically sized sbuf. This requires that the register and deregister paths be made malloc-safe, which they aren't currently. Sponsored by: Netflix |
||
---|---|---|
.. | ||
ata_all.c | ||
ata_all.h | ||
ata_da.c | ||
ata_pmp.c | ||
ata_xpt.c |