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)
Thu, Nov 21, 12:35 AM
Unknown Object (File)
Tue, Nov 19, 3:36 AM
Unknown Object (File)
Tue, Nov 19, 1:37 AM
Unknown Object (File)
Mon, Oct 28, 12:06 PM
Unknown Object (File)
Oct 22 2024, 8:33 PM
Unknown Object (File)
Oct 19 2024, 9:36 PM
Unknown Object (File)
Oct 2 2024, 1:05 PM
Unknown Object (File)
Oct 1 2024, 4:07 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