Add infrastructure so that periphs can use sbufs for device
arrival announcements. Only scsi_da is converted at the moment,
everything else remains working and unchanged. Have not added
device departure infrastructure, nor ATA/SATA infrastructure.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 7465 Build 7627: arc lint + arc unit
Event Timeline
So, the question is, should we just have one version of these functions, and use a stack buffer to re-implement in terms of the new sbuf routines, or would we risk stack overflow?
sys/cam/cam_xpt.c | ||
---|---|---|
1079 | Instead of duplicating xpt_announce_periph() in sbuf form, what do you think about re-implementing it to just call xpt_announce_periph_sbuf() with a static buffer and then printf that? I guess the question would be how big of a stack buffer we're talking about, and whether that would cause things to blow up in any particular situation. | |
1144 | Same question here. | |
sys/cam/scsi/scsi_all.c | ||
5476 | And I suppose the same question goes here. Should we just implement scsi_print_inquiry() in terms of scsi_print_inquiry_sbuf()? | |
sys/cam/scsi/scsi_xpt.c | ||
3132 | And the same question here. Should we just re-implement in terms of scsi_announce_periph_sbuf()? |
sys/cam/cam_xpt.c | ||
---|---|---|
1079 | This path has had problems in the past with blowing out the stack. Adding more to the stack makes me nervous. We can try your suggestion, and I've done it to a lesser degree in some places. However what I'd really like to do is get everything converted, add fine-grained draining, and then remove the legacy functions. This is just an intermediate step to that goal. |
sys/cam/scsi/scsi_all.c | ||
---|---|---|
5476 | Would there be any side effects in camcontrol and other userland utilities from doing this? I would have to be careful about using sbuf_putbuf() because it doesn't exist in userland (and I'm not sure how it would be implemented there). |