qemu-e2k/include/block
Paolo Bonzini cc07162953 block: introduce max_hw_iov for use in scsi-generic
Linux limits the size of iovecs to 1024 (UIO_MAXIOV in the kernel
sources, IOV_MAX in POSIX).  Because of this, on some host adapters
requests with many iovecs are rejected with -EINVAL by the
io_submit() or readv()/writev() system calls.

In fact, the same limit applies to SG_IO as well.  To fix both the
EINVAL and the possible performance issues from using fewer iovecs
than allowed by Linux (some HBAs have max_segments as low as 128),
introduce a separate entry in BlockLimits to hold the max_segments
value from sysfs.  This new limit is used only for SG_IO and clamped
to bs->bl.max_iov anyway, just like max_hw_transfer is clamped to
bs->bl.max_transfer.

Reported-by: Halil Pasic <pasic@linux.ibm.com>
Cc: Hanna Reitz <hreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org
Cc: qemu-stable@nongnu.org
Fixes: 18473467d5 ("file-posix: try BLKSECTGET on block devices too, do not round to power of 2", 2021-06-25)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210923130436.1187591-1-pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2021-10-06 10:25:55 +02:00
..
accounting.h
aio_task.h
aio-wait.h
aio.h iothread: add aio-max-batch parameter 2021-07-21 13:47:50 +01:00
block_backup.h
block_int.h block: introduce max_hw_iov for use in scsi-generic 2021-10-06 10:25:55 +02:00
block-copy.h block/block-copy: block_copy_state_new(): drop extra arguments 2021-09-01 14:38:08 +02:00
block-hmp-cmds.h
block.h block: implement bdrv_new_open_driver_opts() 2021-10-06 10:25:55 +02:00
blockjob_int.h
blockjob.h blockjob: return status from block_job_set_speed() 2021-03-08 15:14:15 -06:00
dirty-bitmap.h block: remove dirty bitmaps 'status' field 2021-03-18 09:22:55 +00:00
export.h
fuse.h
nbd.h nbd/client-connection: add option for non-blocking connection attempt 2021-06-18 12:21:22 -05:00
nvme.h hw/nvme: fix verification of select field in namespace attachment 2021-09-24 08:43:52 +02:00
qapi.h
qdict.h vl: plumb keyval-based options into -readconfig 2021-06-04 13:50:04 +02:00
raw-aio.h
replication.h replication: move include out of root directory 2021-05-26 14:49:46 +02:00
snapshot.h
thread-pool.h
throttle-groups.h
write-threshold.h write-threshold: deal with includes 2021-05-14 16:14:10 +02:00