Page MenuHomeFreeBSD

vtblk: Invoke busdma completion callbacks when polling
ClosedPublic

Authored by markj on Jun 20 2024, 9:45 PM.
Tags
None
Referenced Files
F148974421: D45665.id140052.diff
Sat, Mar 21, 11:06 AM
Unknown Object (File)
Tue, Mar 17, 3:50 AM
Unknown Object (File)
Fri, Mar 6, 6:59 PM
Unknown Object (File)
Thu, Feb 26, 8:29 PM
Unknown Object (File)
Jan 24 2026, 7:34 PM
Unknown Object (File)
Jan 24 2026, 4:08 PM
Unknown Object (File)
Jan 21 2026, 8:21 AM
Unknown Object (File)
Jan 19 2026, 9:59 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 58273
Build 55161: arc lint + arc unit

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