From patchwork Thu Dec 3 02:29:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 11947607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8CFEC6369E for ; Thu, 3 Dec 2020 02:31:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6975A22228 for ; Thu, 3 Dec 2020 02:31:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728064AbgLCCbW (ORCPT ); Wed, 2 Dec 2020 21:31:22 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34956 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728005AbgLCCbW (ORCPT ); Wed, 2 Dec 2020 21:31:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606962595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=+hq4CZba87gfHccYoQYynvzAXiy+JKLLnrQ2htmc5jM=; b=Eid0nf+vTuiqK8QZZ6Z6ienTzxs3A0BGyitWSjfT9aYgTZwNaCi9fs9HtokgS8jMB5LlLm ba4b9Nkw7WCMYZz0Agphz3n7U5m4zDbjLvkAMPX76F7X6oKvNz6EatsRy/02wJd30woYvr CaNWrGBWPv/dJe97D0YyigeprREzksQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-107-S5CTPj-aNwic-kX28sNaiw-1; Wed, 02 Dec 2020 21:29:54 -0500 X-MC-Unique: S5CTPj-aNwic-kX28sNaiw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC3C3185E48B; Thu, 3 Dec 2020 02:29:52 +0000 (UTC) Received: from localhost (ovpn-12-87.pek2.redhat.com [10.72.12.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id A4CC15D6BA; Thu, 3 Dec 2020 02:29:48 +0000 (UTC) From: Ming Lei To: Jens Axboe Cc: linux-block@vger.kernel.org, Ming Lei , Pavel Begunkov , Christoph Hellwig , Matthew Wilcox , linux-fsdevel@vger.kernel.org Subject: [PATCH V2 0/2] block: add bio_iov_iter_nvecs for figuring out nr_vecs Date: Thu, 3 Dec 2020 10:29:38 +0800 Message-Id: <20201203022940.616610-1-ming.lei@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Hi, Add add bio_iov_iter_nvecs for figuring out nr_vecs, so that we can avoid iov_iter_npages() for bvec iter. V2: - split out renaming part into one patch Ming Lei (2): block: add bio_iov_iter_nvecs for figuring out nr_vecs block: rename the local variable for holding return value of bio_iov_iter_nvecs fs/block_dev.c | 30 +++++++++++++++--------------- fs/iomap/direct-io.c | 14 +++++++------- include/linux/bio.h | 10 ++++++++++ 3 files changed, 32 insertions(+), 22 deletions(-) Cc: Pavel Begunkov Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org