Page MenuHomeFreeBSD

vtblk: Invoke busdma completion callbacks when polling
ClosedPublic

Authored by markj on Jun 20 2024, 9:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jul 5, 6:24 AM
Unknown Object (File)
Sat, Jul 4, 11:30 AM
Unknown Object (File)
Sat, Jul 4, 8:45 AM
Unknown Object (File)
Thu, Jul 2, 6:48 AM
Unknown Object (File)
Jun 11 2026, 6:22 PM
Unknown Object (File)
May 19 2026, 1:29 AM
Unknown Object (File)
May 15 2026, 6:23 PM
Unknown Object (File)
May 15 2026, 6:23 PM
Subscribers

Details

Summary

vtblk_poll_request() is used for kernel dumps and for fetching the block
device's identifier string. In the latter case, it was not calling
bus_dmamap_sync() after completing the I/O, but this is required in
general.

Thus:

  • Factor out per-request code from vtblk_queue_completed().
  • Use it in vtblk_poll_request() once virtqueue_poll() finishes.
  • While here, assert that virtqueue_poll() returns the request that we expect.

Reported by: KMSAN
Fixes: 782105f7c898 ("vtblk: Use busdma")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Jun 20 2024, 9:45 PM

Sorry, completely forgot about this. Looks good to me, but I can't test it (not even in Firecracker right now, but if it breaks there I can fix it when I get back to looking at that platform).

This revision is now accepted and ready to land.Jul 2 2024, 7:56 PM