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)
Wed, Nov 26, 7:52 PM
Unknown Object (File)
Nov 11 2025, 12:08 PM
Unknown Object (File)
Nov 11 2025, 3:14 AM
Unknown Object (File)
Nov 10 2025, 9:41 AM
Unknown Object (File)
Nov 9 2025, 10:24 PM
Unknown Object (File)
Nov 9 2025, 7:21 PM
Unknown Object (File)
Nov 4 2025, 2:17 AM
Unknown Object (File)
Oct 31 2025, 6:37 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