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)
Mon, Oct 6, 5:55 AM
Unknown Object (File)
Sun, Oct 5, 8:40 AM
Unknown Object (File)
Fri, Sep 26, 11:32 PM
Unknown Object (File)
Sep 13 2025, 3:52 AM
Unknown Object (File)
Sep 5 2025, 11:48 PM
Unknown Object (File)
Jul 29 2025, 5:32 AM
Unknown Object (File)
Jul 28 2025, 8:35 PM
Unknown Object (File)
Jul 27 2025, 5:28 AM
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