From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCrJY-0005hf-0S for qemu-devel@nongnu.org; Wed, 08 Jul 2015 11:31:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCrJX-0001LF-4p for qemu-devel@nongnu.org; Wed, 08 Jul 2015 11:31:11 -0400 From: Stefan Hajnoczi Date: Wed, 8 Jul 2015 16:30:58 +0100 Message-Id: <1436369462-24252-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH for-2.5 0/4] block: replace IOV_MAX with BlockLimits.max_iov List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , qemu-block@nongnu.org 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 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