From patchwork Sun Apr 14 03:10:52 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: 10899681 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 906FE1515 for ; Sun, 14 Apr 2019 03:11:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6964D28BFE for ; Sun, 14 Apr 2019 03:11:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5702428C03; Sun, 14 Apr 2019 03:11:36 +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 3687B28BFE for ; Sun, 14 Apr 2019 03:11:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727160AbfDNDL3 (ORCPT ); Sat, 13 Apr 2019 23:11:29 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:38090 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbfDNDL3 (ORCPT ); Sat, 13 Apr 2019 23:11:29 -0400 Received: by mail-qk1-f195.google.com with SMTP id g1so7981574qki.5; Sat, 13 Apr 2019 20:11:28 -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=rQQOlENLvv4KpM9p3RTTWDhnHxph1fAzjp1JzmNsB6U=; b=UAGESXIGbcWFiHPRJjyGj1lov7n8aNXRVtmETZvkmrKkv0bFMrr7J2K7m2rUhbQlBp i+dPXH3Vok0S516L0XC9nNv3t6p3FLX2HsdZs6vx809ZpkBtoxS3W4oj75uh/EhXH7Al XL62nY+e0d4XBapcrYyhA7GLH3eTT17gIadybkQQ5DU731jP00bBkThiTv3XCH5WTkBh Eph5RJxe3eIwZxYdgMEADNvfHr07TZMOn38CuqfRZbhjm+f0HSbC7OkDYJjYojzeiMcF wPCyHu4rObaYJXG0ijyCSl2C7+knJamiqHN8Fo1tjLPMJswhuHuF4sZ8rocftaTvI9Vd 1bFg== 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=rQQOlENLvv4KpM9p3RTTWDhnHxph1fAzjp1JzmNsB6U=; b=iF/SkuZspYDNmcqT9uTecV4abrmfIsyQNKKjTHxQaWPOTlWvJPREoNpr0GxaNyyELH avlK8ySzhOV6qHCP16bo3+ZcgfbRBr8GWjRz0KiBlNRR4ZAPuO5VkGHTqUGjrz5NlV8b wDHj2TiP12FSwnn0UzVe158osdUvGW47jIlH1IykxFKGEIBmXWSkFpTijzKVWahS5yRq sHvsp+TlgRymYYvMbzilonuiCp/XiemLpxSULxVAW5a8ocNQ7ShCIsOK7OqO7kIgNdHe oAqakNtjN2ltxXR+sv65CU36w3e4Ih0jvdARRKF4sYv5uZ1mCzwaFB6AV+/1m/fLsnsQ 18ng== X-Gm-Message-State: APjAAAXWRkWwhIGaraGkRC/y95NirztrAcfg+FbVzARBh6zzqcy5PwS7 pZ0sB1lJrquVO617rBM4KSrdim7TU18= X-Google-Smtp-Source: APXvYqy5qMuSefUrzoBzUZMGIaWcHwuNLdn/+rsia0VkFLhpV0CMGB8RxcqNNAOzj9R2Wcs3O+8bbQ== X-Received: by 2002:a37:6c84:: with SMTP id h126mr52903072qkc.168.1555211487510; Sat, 13 Apr 2019 20:11:27 -0700 (PDT) Received: from localhost.localdomain ([191.35.237.58]) by smtp.gmail.com with ESMTPSA id u44sm24668430qte.40.2019.04.13.20.11.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Apr 2019 20:11:26 -0700 (PDT) From: Marcos Paulo de Souza To: linux-kernel@vger.kernel.org Cc: Marcos Paulo de Souza , Jens Axboe , linux-block@vger.kernel.org (open list:BLOCK LAYER) Subject: [PATCH 1/3] blk-mq.c: Add documention of function blk_mq_init_queue Date: Sun, 14 Apr 2019 00:10:52 -0300 Message-Id: <20190414031055.26350-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 Signed-off-by: Marcos Paulo de Souza Reviewed-by: Chaitanya Kulkarni --- 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 Sun Apr 14 03:10:53 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: 10899683 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 62D9C17E0 for ; Sun, 14 Apr 2019 03:12:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CEFB28BFE for ; Sun, 14 Apr 2019 03:12:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E45B28C03; Sun, 14 Apr 2019 03:12: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 E14C628BFE for ; Sun, 14 Apr 2019 03:12:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727226AbfDNDLr (ORCPT ); Sat, 13 Apr 2019 23:11:47 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:44978 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727224AbfDNDLr (ORCPT ); Sat, 13 Apr 2019 23:11:47 -0400 Received: by mail-qk1-f194.google.com with SMTP id y5so7962655qkc.11; Sat, 13 Apr 2019 20:11: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=ioRJ93R4bxzTpNrBT/omYLG29991EfOPLpQtPqkqAgQ=; b=Gt9V7nldqfsGfseiWXUTcvQun0RkP7BRiVDq+qjLeCcnrVOQ52i+jNnychqaL3vLQ5 9V4Q3aiX3gbtI/qp3XPeMa2P1pF0cNO3HVlKbVDiCIOCshr/ECkUIg0s7zzoA/p8aTGW kLcrf5gA2HPMaFyxh8VFd4WseVbxdeNanrh8VE60kvYYRwKbR5/cQscMJP3DZYSAx1m2 goa0YCwtLa4O9yxnI4PT4AJ7w3RGUTsymQyJtBA1QB2ZlyauWOcEB0yjE2TMFaWQWNxY RP8z1QP6O2/nFQ4CzxhNiCfoc+do2sqgrRzm4b2l+tIrpa9MlCjv61CST/vRHBMx2pXh nZWA== 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=ioRJ93R4bxzTpNrBT/omYLG29991EfOPLpQtPqkqAgQ=; b=Q4XbZRknr5bhKoHc+bUHaK8Ypik9fzNvROgNFVd/UrP0CPfMrSlDdr4IagBEriW1jS 4tt2l1YfwiZWG95uk1yt89/g5AzovqFvoLkNIFS0Tn9o4G62MzepsqukJDAYOgyggpn5 p9zxIfadE+b5j7gGBK9U45UZhgxJaO7ZPU4btn4OUQ+Yk3Hp1EBV3AIGWRkfghaXhCi5 nsOhBVI5L0poeAmqJdchRHCgAvthN8CUvEyOtO/8gMdusTkB/DXEXSNVIUsZb/44meq+ CYBdqO/knhcERzVYJ34Iga0ED2d485gv/5SSMnsj8OamghlT/KiaYpXbJAbv0Yz9ApQU lk4Q== X-Gm-Message-State: APjAAAWuphwMBgiAY5G1ijTaIG9L6MLf5CEqPFWxgQ6x9EJIGP6+ibF2 RmLYongth8QbRA+A1lIh3M5HTULXpZQ= X-Google-Smtp-Source: APXvYqz8V3t9H81rbD8ATODHpg3/qZVqTU/c3ijWAkoxAU+ULR2T2GouPXsFYh8QJrfeUza9KUSxIQ== X-Received: by 2002:ae9:ef07:: with SMTP id d7mr53328282qkg.100.1555211506087; Sat, 13 Apr 2019 20:11:46 -0700 (PDT) Received: from localhost.localdomain ([191.35.237.58]) by smtp.gmail.com with ESMTPSA id u44sm24668430qte.40.2019.04.13.20.11.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Apr 2019 20:11:45 -0700 (PDT) From: Marcos Paulo de Souza To: linux-kernel@vger.kernel.org Cc: Marcos Paulo de Souza , Jens Axboe , linux-block@vger.kernel.org (open list:BLOCK LAYER) Subject: [PATCH 2/3] blk-mq.c: Rework documention of blk_mq_init_sq_queue function Date: Sun, 14 Apr 2019 00:10:53 -0300 Message-Id: <20190414031055.26350-2-marcos.souza.org@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190414031055.26350-1-marcos.souza.org@gmail.com> References: <20190414031055.26350-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, and what the arguments are meant for. Signed-off-by: Marcos Paulo de Souza --- 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..fd0bf89b8a73 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 a SQ queue and tag set + * @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,