Page MenuHomeFreeBSD

Break down the sglist if VIRTIO_BLK_F_SIZE_MAX is on
Needs ReviewPublic

Authored by khng300_gmail.com on Wed, Nov 18, 3:14 AM.

Details

Reviewers
grehan
bryanv
Summary

This change introduce a mechanism to break down the sglist used in
virtio_blk. If VIRTIO_BLK_F_SIZE_MAX is advertised by the host, the
maximum size of each segments in the scatter/gather should be
limited to the size advertised by the host.

Reported by: Yuan Rui <number201724@me.com>
MFC after: 2 weeks

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 34883
Build 31904: arc lint + arc unit

Event Timeline

khng300_gmail.com created this revision.
  • Change wordings of comment a bit
  • Fix some weird lines in vtblk_sg_split_append
  • Remove the unnecessary PAGE_SIZE vs size_max checking
  • Rename vtblk_max_size to vtblk_size_max to match the spec more
  • Make vtblk_size_max size_t to match sglist(9) more
  • Remove an unnecessary short path for vtblk_sg_split