qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.5 0/4] block: replace IOV_MAX with BlockLimits.max_iov
@ 2015-07-08 15:30 Stefan Hajnoczi
  2015-07-08 15:30 ` [Qemu-devel] [PATCH for-2.5 1/4] block: add BlockLimits.max_iov field Stefan Hajnoczi
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2015-07-08 15:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi, qemu-block

This series depends on "[PATCH] block/mirror: limit qiov to IOV_MAX elements".

IOV_MAX has been hardcoded in several places since preadv()/pwritev()/etc
refuse to take more iovecs per call.  That's actually an implementation detail
of raw-posix and we shouldn't spread that across the codebase.

This series adds BlockLimits.max_iov (similar to BlockLimits.max_transfer_len
and other fields).  By default it is INT_MAX but raw-posix sets it to IOV_MAX.

Current IOV_MAX users are converted to blk_get_max_iov().

By the way, the IOV_MAX vs BlockLimits.max_iov naming is slightly confusing but
follows the BlockLimits field naming convention.  Once IOV_MAX is banished no
one will be bothered by the reverse naming anymore.

Suggested-by: Kevin Wolf <kwolf@redhat.com>

Stefan Hajnoczi (4):
  block: add BlockLimits.max_iov field
  block-backend: add blk_get_max_iov()
  block: replace IOV_MAX with BlockLimits.max_iov
  block/mirror: replace IOV_MAX with blk_get_max_iov()

 block/block-backend.c          | 5 +++++
 block/io.c                     | 6 +++++-
 block/mirror.c                 | 6 ++++--
 block/raw-posix.c              | 1 +
 hw/block/virtio-blk.c          | 2 +-
 include/block/block_int.h      | 3 +++
 include/sysemu/block-backend.h | 1 +
 7 files changed, 20 insertions(+), 4 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-07-09  9:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08 15:30 [Qemu-devel] [PATCH for-2.5 0/4] block: replace IOV_MAX with BlockLimits.max_iov Stefan Hajnoczi
2015-07-08 15:30 ` [Qemu-devel] [PATCH for-2.5 1/4] block: add BlockLimits.max_iov field Stefan Hajnoczi
2015-07-09  4:39   ` Peter Lieven
2015-07-09  9:46     ` Stefan Hajnoczi
2015-07-08 15:31 ` [Qemu-devel] [PATCH for-2.5 2/4] block-backend: add blk_get_max_iov() Stefan Hajnoczi
2015-07-08 15:31 ` [Qemu-devel] [PATCH for-2.5 3/4] block: replace IOV_MAX with BlockLimits.max_iov Stefan Hajnoczi
2015-07-08 15:31 ` [Qemu-devel] [PATCH for-2.5 4/4] block/mirror: replace IOV_MAX with blk_get_max_iov() Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).