From patchwork Wed Apr 17 02:10:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcos Paulo de Souza X-Patchwork-Id: 10904371 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BEA8313B5 for ; Wed, 17 Apr 2019 02:11:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A68D728A44 for ; Wed, 17 Apr 2019 02:11:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99FAA28A4C; Wed, 17 Apr 2019 02:11:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48615281E1 for ; Wed, 17 Apr 2019 02:11:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729412AbfDQCKr (ORCPT ); Tue, 16 Apr 2019 22:10:47 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:40119 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728032AbfDQCKq (ORCPT ); Tue, 16 Apr 2019 22:10:46 -0400 Received: by mail-qt1-f194.google.com with SMTP id x12so25694693qts.7; Tue, 16 Apr 2019 19:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8E78349DtaExhsNzU6Me959vfhX7B7zUGIpotLMFF2I=; b=ZLbL2WxKC4V8eUvL4j4y8/cfMt4imMzxpgnSW8TT/W1Lk1S0XHv4A90dsU4pa+9XLj dfk7PKpWE2TJssTV6hc2G9ysXYJvwvmrM+y9DMMt2FENm+YPjhWbWm7mxuqQtbAGT6fl mjOtBR0nQlCj7K2RTNaxvE1MEsBzAgE1z9cm8yAV4gJV6awLKUTd2BH53VDXucIVUyk6 Ow6DDGkgK0RrvwIu4N7okFaKx4OB+vNkrZE0dDNyKYht9q7WolVXr5r5Z4wTwje/8yQ8 t1MIq4Ts9Vtaie+FFeo1U0tMnf9tN3m1qM0QG9wbORenQUKAMaGXQ6Bxg//MnFY3w1mf 3M5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8E78349DtaExhsNzU6Me959vfhX7B7zUGIpotLMFF2I=; b=bZQmMMW11ZmkUTBysaiBYoynkHpwOEUzsfD5PxbIms4GHGsS7u0r5JPysj/QMPdays 24RdzFTO0Ixni8kKX622D/Us/R0izIF7caFr4RpziVMJndlbbFwON+IcrJqUiT6hfOG5 mEBAnKbciLOoVh2gAOseSIZ3I136fnl2yPIDZXVpVu9fVU/Dg5szIYlCilSZs4ZjGN65 THxn/QuCa+VeByhmIfR68NeW/v2vjyublUgMmznQwieFlHMMPEhuals7T2Ybff5qbxhy G5LkEBSx+iECvaWSlK9c3tPEky7FzRprYMQmFXKb7VNTwbGWbFBtN1F8W4yK8ycY+64y KB9A== X-Gm-Message-State: APjAAAWaOj5XosiheetBmmbONMPsHCvNKdVaRhijWhyY21CYPr2w6GKc kTD9wrn4zqDchZy+6bZFlqn4+aFeH8M= X-Google-Smtp-Source: APXvYqxvxUqxORYbV1jyE1YtjRpHEvYpjR4KSxpxdf6ROl3/ctKbGDhNSUX457PyJiQE03oH9Jus9A== X-Received: by 2002:ac8:2f11:: with SMTP id j17mr69439487qta.334.1555467045293; Tue, 16 Apr 2019 19:10:45 -0700 (PDT) Received: from localhost.localdomain (179.187.200.226.dynamic.adsl.gvt.net.br. [179.187.200.226]) by smtp.gmail.com with ESMTPSA id s55sm1497228qte.17.2019.04.16.19.10.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 19:10:44 -0700 (PDT) From: Marcos Paulo de Souza To: linux-kernel@vger.kernel.org, marcos.souza.org@gmail.com Cc: linux-block@vger.kernel.org, axboe@kernel.dk, bvanassche@acm.org, Chaitanya.Kulkarni@wdc.com Subject: [PATCH v3 1/3] blk-mq.c: Add documention of function blk_mq_init_queue Date: Tue, 16 Apr 2019 23:10:28 -0300 Message-Id: <20190417021030.82998-2-marcos.souza.org@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190417021030.82998-1-marcos.souza.org@gmail.com> References: <20190417021030.82998-1-marcos.souza.org@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reviewed-by: Chaitanya Kulkarni Signed-off-by: Marcos Paulo de Souza --- block/blk-mq.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index 9516304a38ee..4a8277a54c03 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2650,6 +2650,15 @@ void blk_mq_release(struct request_queue *q) blk_mq_sysfs_deinit(q); } +/** + * blk_mq_init_queue - Create a new request queue associating a blk_mq_tag_set + * @set: tag_set to be associated with the request queue + * + * Description: + * This function creates a new request queue, associating @set with it. + * + * Returns a new request queue on success, or ERR_PTR() on failure. + */ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set) { struct request_queue *uninit_q, *q; From patchwork Wed Apr 17 02:10:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcos Paulo de Souza X-Patchwork-Id: 10904367 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8EA7213B5 for ; Wed, 17 Apr 2019 02:11:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AE5728662 for ; Wed, 17 Apr 2019 02:11:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EB6028A4C; Wed, 17 Apr 2019 02:11:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5565228A3F for ; Wed, 17 Apr 2019 02:10:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730349AbfDQCKv (ORCPT ); Tue, 16 Apr 2019 22:10:51 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:43345 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728032AbfDQCKu (ORCPT ); Tue, 16 Apr 2019 22:10:50 -0400 Received: by mail-qk1-f196.google.com with SMTP id c20so13451626qkc.10; Tue, 16 Apr 2019 19:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IWc/oCnoras1AyWB6niD02t6m/9yqKbPHgDLRnpDnfU=; b=ebKeGHeqE8CFjCbb/8lqpz547w/IapbVZ0vHEFWx9P0pj/+bANwXAklKARibAPAG6D 81Cr1ul4AUw5n4SkpN/8CbVJ4H7rHxP9TbIMU39CHmWwioqpwl4Zd7/4C2m6n6HLgjA6 3zkyy3mOaqkBJi7PbPBtKJqzxq+oAU7GQS+QoEamA2TEh7+XXEAEhjW0F3ZnQmgMYOfx 48080dfCKuWjg4CsYpT988SyRsYGq8Y4/MTuPB/VVRuQxQzlJmg4/CrxiyCOV9lj4iYK RhOTyuZR2UXDm7brL5vRRi0jRTejbc3pBKpiT4fL0YAzrJaicdmL0lR1Se5ARwbY/H2r f13A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IWc/oCnoras1AyWB6niD02t6m/9yqKbPHgDLRnpDnfU=; b=MLNhQyc61XKB5INljxEqIDDq6fLmX5HDplcXB5gsFrTfjDb/Zbf6Ba7CNvMTIzA+0H CD2wx2IGPnu1ihk0DA30Cj5PMket6flibAr/srXGFgG8dLUBWO01XIcVlCb/IRn0mg+Z xBhDsMGY9qGDOfHYBfX+QzBtt4icbAwogk9jq0YeJe7kYMdm2T3uz5KrWu5e+oo/MWe2 u/ewpE9dyj0ap5WnmlVIjSUthNwTz13y+gKa4awhms0jKJQvmr7574eeeITU8VFGdhdm WlahQVPXgPw9He7twB5ZlQWlLrwDGvhAsLStH/dCqr6pjthIIyIHmQPjCwKFo71Dcc8A gLYw== X-Gm-Message-State: APjAAAW4F7Ebwpuu90vbk4t72gENZPE+npgN7hVI96bP+IP7te8PL6M9 YB5E2jah0Pi/2xbsD6CNvDjDj4S/v3s= X-Google-Smtp-Source: APXvYqyFkJwNdv/UdWEAa6fLx4cNDhcRtG1O1AHb2rOrv6D6RPF44g+l0Dj0xLNOXqONwbPcKlWTLg== X-Received: by 2002:a05:620a:108f:: with SMTP id g15mr64918534qkk.61.1555467048390; Tue, 16 Apr 2019 19:10:48 -0700 (PDT) Received: from localhost.localdomain (179.187.200.226.dynamic.adsl.gvt.net.br. [179.187.200.226]) by smtp.gmail.com with ESMTPSA id s55sm1497228qte.17.2019.04.16.19.10.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 19:10:47 -0700 (PDT) From: Marcos Paulo de Souza To: linux-kernel@vger.kernel.org, marcos.souza.org@gmail.com Cc: linux-block@vger.kernel.org, axboe@kernel.dk, bvanassche@acm.org, Chaitanya.Kulkarni@wdc.com Subject: [PATCH v3 2/3] blk-mq.c: Rework documention of blk_mq_init_sq_queue function Date: Tue, 16 Apr 2019 23:10:29 -0300 Message-Id: <20190417021030.82998-3-marcos.souza.org@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190417021030.82998-1-marcos.souza.org@gmail.com> References: <20190417021030.82998-1-marcos.souza.org@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Describing better what the function does, what the arguments are meant for, and what SQ stands for. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Marcos Paulo de Souza --- block/blk-mq.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 4a8277a54c03..03f45d0cd795 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2675,9 +2675,21 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set) } EXPORT_SYMBOL(blk_mq_init_queue); -/* - * Helper for setting up a queue with mq ops, given queue depth, and - * the passed in mq ops flags. +/** + * blk_mq_init_sq_queue - Create a new request queue with only one hw_queue (SQ) + * @set: tag set to be associated by the newly created request queue + * @ops: operations to be associated with @set + * @queue_depth: number of tags of @set + * @set_flags: flags that will be associated with @set, like BLK_MQ_F_TAG_SHARED + * or BLK_MQ_F_BLOCKING for example. + * + * Description: + * @set is initialized using @ops, @queue_depth, @set_flags, and using only one + * hw_queue (SQ). Later on blk_mq_alloc_tag_set() is called to validate and/or + * adjust values of the tag set. blk_mq_init_queue() is called passing @set as + * argument, returning a new request queue with @set associated. + * + * Returns the newly created request queue on success, or ERR_PTR() on failure. */ struct request_queue *blk_mq_init_sq_queue(struct blk_mq_tag_set *set, const struct blk_mq_ops *ops, From patchwork Wed Apr 17 02:10:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcos Paulo de Souza X-Patchwork-Id: 10904369 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 405451850 for ; Wed, 17 Apr 2019 02:11:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E38A2817F for ; Wed, 17 Apr 2019 02:11:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BA4D28A3F; Wed, 17 Apr 2019 02:11:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE52128662 for ; Wed, 17 Apr 2019 02:11:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730848AbfDQCK4 (ORCPT ); Tue, 16 Apr 2019 22:10:56 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:42924 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728032AbfDQCKw (ORCPT ); Tue, 16 Apr 2019 22:10:52 -0400 Received: by mail-qk1-f195.google.com with SMTP id b74so13457253qkg.9; Tue, 16 Apr 2019 19:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GikxrOMvkBouqwGAydsHalkqVsemnnDXG0/IMRMQiDw=; b=sPJZP9UkGu2hFwim30z89DRkk7WSG4/2eCLIL4JQXKNhn//ObzCRL8Z6/f99vrRE7B nsoX3pS0vC8F2WVQ/zhXLWJkz118SgMQvexHUX1QpH+bftjyfcy0MnHQUrbUcrSLQO2c aArKUcZf3r7DYPdAqU7zn5sQnnCsyxSQ6ZQctjg8QHPpu9cTHQc/K+ZlbmdphPttvxVa 7SMsOnRRtzuNfj83/Hq1OSMazmNbd6qmu5nXMHi3VQO6kb+n7EaX2E5aPi2UQokBolTH UJbFnUYdY25v/jcr9xU7YLTRhrtE/hQxgDNEiROADU52dbam7mfMCb57pYDj3vG/CJDo ijxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GikxrOMvkBouqwGAydsHalkqVsemnnDXG0/IMRMQiDw=; b=suRkVSNBM+6/DFS0zpQc4IiWmEL1o5PYGw3BrnGkWfuM7/swDt29ob2r+8X+ABztxp uDKXW38Ke36yK/dC81TGjSWa/uOs7Z5y7WoNIRpPbFy6QalZ5EUOHJNhD+JdT6YNuqXJ 0iCoRf4nMTsnpxEaAlkUyKo3kcLdCUuI8fIdrQSbGjUF6yTwVxl0sx/3ETVF7aKsQRiV 273PiwfilHfu8A2UPlPgq7vUd4MJS35IqQpQ9SQ3LfXcRX7w5AhNosHLH+SaYxR630Jh kuyFi0xYf8qE9aas1SM/ZU8Hszx0EqXLoVW4hafiStQ8sjVyxXoN676wbt7is5siIOwj DYkQ== X-Gm-Message-State: APjAAAWUyDJHL3NxThDOOIt6FfN/4xm+8GKZOcn0DYtB9yDGV4EbD05W sFeIOiUTFIA/prb0UrdaXNkuNXcdmM4= X-Google-Smtp-Source: APXvYqzDG9vs7IlvoxexD+iIQN9LLCEwJDcfOcGtV1l9+bskUrP2ulOIrMHM3DOEvv99GZbP1ivd0Q== X-Received: by 2002:a37:9b87:: with SMTP id d129mr22177809qke.263.1555467051364; Tue, 16 Apr 2019 19:10:51 -0700 (PDT) Received: from localhost.localdomain (179.187.200.226.dynamic.adsl.gvt.net.br. [179.187.200.226]) by smtp.gmail.com with ESMTPSA id s55sm1497228qte.17.2019.04.16.19.10.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 19:10:50 -0700 (PDT) From: Marcos Paulo de Souza To: linux-kernel@vger.kernel.org, marcos.souza.org@gmail.com Cc: linux-block@vger.kernel.org, axboe@kernel.dk, bvanassche@acm.org, Chaitanya.Kulkarni@wdc.com Subject: [PATCH v3 3/3] Documentation: kernel-api.rst: Add block/blk-mq.c Date: Tue, 16 Apr 2019 23:10:30 -0300 Message-Id: <20190417021030.82998-4-marcos.souza.org@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190417021030.82998-1-marcos.souza.org@gmail.com> References: <20190417021030.82998-1-marcos.souza.org@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now documented functions of blk-mq.c will appear in the official kernel documentation. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Marcos Paulo de Souza --- Documentation/core-api/kernel-api.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/core-api/kernel-api.rst b/Documentation/core-api/kernel-api.rst index 71f5d2fe39b7..cc323480ce0e 100644 --- a/Documentation/core-api/kernel-api.rst +++ b/Documentation/core-api/kernel-api.rst @@ -276,6 +276,12 @@ Block Devices .. kernel-doc:: block/blk-map.c :export: +.. kernel-doc:: block/blk-mq.c + :export: + +.. kernel-doc:: block/blk-mq.c + :internal: + .. kernel-doc:: block/blk-sysfs.c :internal: