From mboxrd@z Thu Jan 1 00:00:00 1970 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=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 BAD0BC433E0 for ; Tue, 16 Mar 2021 03:19:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8BA4E65081 for ; Tue, 16 Mar 2021 03:19:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234758AbhCPDS6 (ORCPT ); Mon, 15 Mar 2021 23:18:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57689 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232177AbhCPDSj (ORCPT ); Mon, 15 Mar 2021 23:18:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615864718; 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: in-reply-to:in-reply-to:references:references; bh=pPmdiGFpIEVHHdkjC5nrbTsamI2Cw8osFs9EsU37nO0=; b=AsIpwbIJILZRaNNM5RlOjMPmfLEP6dkqmiwixkzJk9CKkQyM3daFjSMmFYpQEbN/X9euU+ o69T5q9tJOFiKM8sT//dyrwAlnx20i0ctfUuJuE6FBeIOTP4R0vjQCXJLBDjOcqD5/vcv9 LmmWja+vSTrUHLT6cjT0hSh7qo/jFTM= 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-48-M_Q4PBwyO3Sa6_OxTYscOw-1; Mon, 15 Mar 2021 23:18:36 -0400 X-MC-Unique: M_Q4PBwyO3Sa6_OxTYscOw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C14E13E745; Tue, 16 Mar 2021 03:18:35 +0000 (UTC) Received: from localhost (ovpn-12-86.pek2.redhat.com [10.72.12.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9056E1F04A; Tue, 16 Mar 2021 03:18:24 +0000 (UTC) From: Ming Lei To: Jens Axboe Cc: linux-block@vger.kernel.org, Christoph Hellwig , Jeffle Xu , Mike Snitzer , dm-devel@redhat.com, Ming Lei Subject: [RFC PATCH 06/11] block: add new field into 'struct bvec_iter' Date: Tue, 16 Mar 2021 11:15:18 +0800 Message-Id: <20210316031523.864506-7-ming.lei@redhat.com> In-Reply-To: <20210316031523.864506-1-ming.lei@redhat.com> References: <20210316031523.864506-1-ming.lei@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org There is a hole at the end of 'struct bvec_iter', so put a new field here and we can save cookie returned from submit_bio() here for supporting bio based polling. This way can avoid to extend bio unnecessarily. Signed-off-by: Ming Lei --- include/linux/bvec.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/bvec.h b/include/linux/bvec.h index ff832e698efb..61c0f55f7165 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h @@ -43,6 +43,15 @@ struct bvec_iter { unsigned int bi_bvec_done; /* number of bytes completed in current bvec */ + + /* + * There is a hole at the end of bvec_iter, define one filed to + * hold something which isn't relate with 'bvec_iter', so that we can + * avoid to extend bio. So far this new field is used for bio based + * pooling, we will store returning value of underlying queue's + * submit_bio() here. + */ + unsigned int bi_private_data; }; struct bvec_iter_all { -- 2.29.2