From patchwork Tue Apr 16 03:27:59 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: 10901883 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 3F59917E0 for ; Tue, 16 Apr 2019 03:28:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 271542894E for ; Tue, 16 Apr 2019 03:28:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1963628958; Tue, 16 Apr 2019 03:28:20 +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 AE68E2894E for ; Tue, 16 Apr 2019 03:28:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726147AbfDPD2S (ORCPT ); Mon, 15 Apr 2019 23:28:18 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:33109 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbfDPD2S (ORCPT ); Mon, 15 Apr 2019 23:28:18 -0400 Received: by mail-qt1-f193.google.com with SMTP id k14so21808908qtb.0; Mon, 15 Apr 2019 20:28:18 -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; bh=qxR/VSmhVAnwQ7CoAhaj16Ah5GAR8GCDmtbF4pt8Ue4=; b=U+lHZ2E+zRh/11+fSX4FJT6ebmwA50tTUJemVw70a8ffC6MHrSQY7NK8AuLOjlQ4xf 1h+uCX2LBB270AHxAphYhKR1t6idZ9abRtFnHImS14r1q02HF8v3StYivpSIJLutLpGH /ObgWxVWzhV723RbGBEVsRLzCI+X5m0l4+5dAz4T11V/bZ1u5en3gInV/f1m6Jep8qo7 LnJKBi98kJxfuKiv49atqXMfx/4P0cfTM8ScedlMxV4H0C++ChsVneFvlyHiXDLbvcQV ma5RSl8XIyH38riZK0vajExDp50I8Th2oJIdoxr02JfBvXLc38M9jSE9fuT2SEyZsctF R9KQ== 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; bh=qxR/VSmhVAnwQ7CoAhaj16Ah5GAR8GCDmtbF4pt8Ue4=; b=P6ItaC/Aaw+IoRM/Ixev5yTLZEa+DK/ltFWIQu9uXHIT4OsPJcTHViAnFuaLONrA5y oZR80Gz9FJh9hs1EgLeWF5xAyh1QrgPt3GRuJl4CV5AH7M17BSxMKa6pZMwElmiPtg8Q G8zRd2IwvzTF9UCv4DvlRsIQsiv65iOLtOp+4x08SuPVGKAYqrGaeWq/spljT0fN7CRj BgQEMm4wtwT0j7ZCt/JlBywM67bgyKx7aBx6f/bJ1vUFYlwguz1SETScSgxtbvo/7DCy v4fJrOM9RWnkpMQsABJikjS3QpVSZk3ElX8GsBKAMg8Ww1SuI8JXtWJN903uw6NcKMzW galw== X-Gm-Message-State: APjAAAWZBPPJXaAcnTjZCeWW82HNxWM+kjV+n84MhWpHuXzoq4x4Mdsq guBaArlNffcNVjOa9aBLiFc82DXHKPw= X-Google-Smtp-Source: APXvYqxuE9tZNeTZxaZ0azv8uAxH02LqYdULUpujIt9WSflaBRb4aiJ2IQh+CqlDyyWjnNVngAW2Mg== X-Received: by 2002:ac8:1638:: with SMTP id p53mr62158582qtj.257.1555385297197; Mon, 15 Apr 2019 20:28:17 -0700 (PDT) Received: from localhost.localdomain (189.26.177.132.dynamic.adsl.gvt.net.br. [189.26.177.132]) by smtp.gmail.com with ESMTPSA id z16sm21501299qti.53.2019.04.15.20.28.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 20:28:15 -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, Chaitanya.Kulkarni@wdc.com Subject: [PATCH v2 1/3] blk-mq.c: Add documention of function blk_mq_init_queue Date: Tue, 16 Apr 2019 00:27:59 -0300 Message-Id: <20190416032801.200694-1-marcos.souza.org@gmail.com> X-Mailer: git-send-email 2.16.4 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 --- No changes from v1. 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 Tue Apr 16 03:28:00 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: 10901887 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 54FD8161F for ; Tue, 16 Apr 2019 03:28:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D8B528896 for ; Tue, 16 Apr 2019 03:28:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31CC428956; Tue, 16 Apr 2019 03:28:32 +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 D4B7328896 for ; Tue, 16 Apr 2019 03:28:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbfDPD2W (ORCPT ); Mon, 15 Apr 2019 23:28:22 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:42899 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbfDPD2V (ORCPT ); Mon, 15 Apr 2019 23:28:21 -0400 Received: by mail-qt1-f196.google.com with SMTP id p20so21739887qtc.9; Mon, 15 Apr 2019 20:28:21 -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=cUB3G7OaQfdrxLlctGQ4Z6HvVW/8bG6i4wnrDGn5MTU=; b=kmCGGJ9JCG7ZglpFvB1Ziy7QjGpJPw76ZsbEcXFIYQKRUOqKwOcbwMFLVntHvp8rU2 R/I11nl1KxYD90Qr2hUMe0yjmHAFzLfxiYguNJAVBHM/jgPde+uNqJprdqnw5vncoVg5 AyNtHv1YwOA0J/1E0+XuRbTU8OXNj+TqBHoErJiQ9bz4WpdrItYZVV89yzlO+UCr+W7K 6zc1CKQguuwB0VcrtSNUq6SgnZpwA6wIVXbkIKVsffmPnj8RM+MTf+ntHIqN0JU+C4pO 1B4r3/Vp0EB5P4dYQtQhKG5RxelnjqLNVQP9aW1BZvZkVtN+K2Ikd+iXngzuPrQTcHuE kpvw== 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=cUB3G7OaQfdrxLlctGQ4Z6HvVW/8bG6i4wnrDGn5MTU=; b=SsN7WY51/GYxYrMLCk7gptxJ7ExydK7Lm8lcbgJGZnASF27F/goc5y8juQLKqUfTOS ABYLqqIFDQ2XKXllxH/oavgesRQyL7FeoukJ9RCvjdfY7c5ap5gVcKh5vnyaDkYEtKTn vEYiT8P/7HX977lVhF4i1mRU5T5Qr8xUt58A5R1wNIOkYPyX2VDodU8ls43s56r96z7o NgJlJ2HwwbwUDE0DQjseC6w0LlSNy4PPJE3vhFD6XsaDweeMjSTt7D5d2ieaLCVLSNAE pAXmMLAGWHZz0+UixpNMWqoiP1rZdC+x6OtXbXyiayjGcTUqjbhpaple6xJuZWr+oxhQ 3fhQ== X-Gm-Message-State: APjAAAWvSVonbJhVbzMf/JjeJeyrpbq50RxYcoYgfDjK4n/66kw2w1lO OJlG64ISaLD8LaiYrNiuQa63aDXvlO0= X-Google-Smtp-Source: APXvYqzdoxIANRcn2klC6GBaD6WIXBo5bZkeLmicw/WwOPSrGJbgJhf39zhXDtEOShXaMsvDlIFYIg== X-Received: by 2002:a0c:c11c:: with SMTP id f28mr62828060qvh.106.1555385300295; Mon, 15 Apr 2019 20:28:20 -0700 (PDT) Received: from localhost.localdomain (189.26.177.132.dynamic.adsl.gvt.net.br. [189.26.177.132]) by smtp.gmail.com with ESMTPSA id z16sm21501299qti.53.2019.04.15.20.28.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 20:28:19 -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, Chaitanya.Kulkarni@wdc.com Subject: [PATCH v2 2/3] blk-mq.c: Rework documention of blk_mq_init_sq_queue function Date: Tue, 16 Apr 2019 00:28:00 -0300 Message-Id: <20190416032801.200694-2-marcos.souza.org@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190416032801.200694-1-marcos.souza.org@gmail.com> References: <20190416032801.200694-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. Signed-off-by: Marcos Paulo de Souza Reviewed-by: Chaitanya Kulkarni --- Changes from v1: * Change "SQ" to "only one hw_queue (SQ)" in the function signature documentation (suggested by Chaitanya) block/blk-mq.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 4a8277a54c03..3f13cfb47cf0 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2675,9 +2675,20 @@ 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 of @set + * + * 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 Tue Apr 16 03:28:01 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: 10901885 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 66F1917E0 for ; Tue, 16 Apr 2019 03:28:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DF0028896 for ; Tue, 16 Apr 2019 03:28:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E91828956; Tue, 16 Apr 2019 03:28:31 +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 ED50928896 for ; Tue, 16 Apr 2019 03:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726469AbfDPD20 (ORCPT ); Mon, 15 Apr 2019 23:28:26 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:40102 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbfDPD2Y (ORCPT ); Mon, 15 Apr 2019 23:28:24 -0400 Received: by mail-qt1-f196.google.com with SMTP id x12so21751113qts.7; Mon, 15 Apr 2019 20:28:23 -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=hQC5aSEtbFdhbXWX1DeduxbyazYDPsD+6g5fd10gWwI=; b=DlnVkBFqvpn9QjAmP4wXC87GuVWp/Eg+Rb+Twi2frnhqV56+b3R3w/QnK2HZV7FmTq xwqWTJ3LUPkaWlbRWlj++fqLeJkhIMgOUagJbZ6jBV6lDB6ykiTAK24yfFfXdtiGdub5 KSzozx617bTCgg3xqislRTD5SKPXg5r4GHdkGafoyUXInOid0+NbWnC+fZS8Sw4P1dwd 1Tf47vLMqHlfCuEwHAgYbKE+AabicWqZDpShtc0svP7Eeesjco8yd73cwIeuFht6u/9W AyWgcpOlpzOAMXiJ2rTztyjkOamENVPfVL44D/AzPS3U4ygDdE8mOuqujSaNs9ZimZPz B+zQ== 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=hQC5aSEtbFdhbXWX1DeduxbyazYDPsD+6g5fd10gWwI=; b=gOM0j7iAd/Kob12qbL0UQEUviSnfB+HZ3pVqAHgFfsuaheKx1/FZxZSyudtpN6RrSg WP95/FKVQQ2L+763ebd8zgx8AI0tsrMw6d5Tl1Y2TqnRJ/gnlCRdw6U3JYckfJnrkadK nwUah7NA/LdYYRhYgoERgdfjVShNL/Jw/yoUc/Tm5oXxPa/cxB7LM12ODc7isvDO+668 uX4B+m2WFkSCVJnvEJp8aoHgpAH0osoZki2rYhpP845qwv6OG87kVFzFDUdJRKXbuLAN R8VYFQV9g7Sr5fmMkI1e/qtepS33G/VP9W2YhhnvLvh+zs08I/8EZYnI9AMtJQc2HqHY NnfA== X-Gm-Message-State: APjAAAXJNvNk0VkUN/WaejLa6xkds9zxaxwl7uJ0kGXep27WrdTvONVD Kb42rsolSbXtrVbO1UMIrvxyfqr3QEk= X-Google-Smtp-Source: APXvYqyIirsI5x0kqsT7rLXFkdKYEPr7Y5MQS5xI9qTAuf1y50UdLJjx+4JrQSqKNLWPAHikdxMMJQ== X-Received: by 2002:a0c:87b3:: with SMTP id 48mr63192996qvj.199.1555385302937; Mon, 15 Apr 2019 20:28:22 -0700 (PDT) Received: from localhost.localdomain (189.26.177.132.dynamic.adsl.gvt.net.br. [189.26.177.132]) by smtp.gmail.com with ESMTPSA id z16sm21501299qti.53.2019.04.15.20.28.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 20:28:22 -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, Chaitanya.Kulkarni@wdc.com Subject: [PATCH v2 3/3] Documentation: kernel-api.rst: Add block/blk-mq.c Date: Tue, 16 Apr 2019 00:28:01 -0300 Message-Id: <20190416032801.200694-3-marcos.souza.org@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190416032801.200694-1-marcos.souza.org@gmail.com> References: <20190416032801.200694-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. Signed-off-by: Marcos Paulo de Souza Reviewed-by: Chaitanya Kulkarni --- No changes from v1. 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: