Message ID | 20230207070839.370817-4-ZiyangZhang@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2695986wrn; Mon, 6 Feb 2023 23:14:01 -0800 (PST) X-Google-Smtp-Source: AK7set9RXAXDlTl3vIR1VIWwGMz9hpCvw+7n3VZDAqWPzBvIFR7w+pUBf7SPmsmLx6hexOCTl8UT X-Received: by 2002:a17:90a:4ca6:b0:230:8f60:8874 with SMTP id k35-20020a17090a4ca600b002308f608874mr2877596pjh.33.1675754041176; Mon, 06 Feb 2023 23:14:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675754041; cv=none; d=google.com; s=arc-20160816; b=sHQjeF+yMGBnyPNMlIDWyBx5Nki/SkO3AuxyVYFhi9h24AYK8POM4PcTjVSEqnLP91 ZTnitf7Mtq/zx8e6F4x2F/hTjaW4iSD+PZfvgfWqyBi3bYfx+3yvX+OYKfKb7SLP+LNi R5OvxlJzcQz1LHFToKgpuTfWs9r9TYVsa4PMF76Xwz8aqWfzbCXSpREUwBa/UztQ+WgU 74PYKsu3hS0yS7hOPItAxgG3sgSQV3p1HRlDYV8NTCrVmkSvG89346smVmcQP1myZ43G HZElAlhYuwQx+fzecRff2qOmHZOMvyqZtcNhTQPpgXT/Wj6DmJS0pDPATCNJWe9HjO0e vATw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=bcezesS4f3phAjWdE6F5AUz0d/YwXg3WZRy59TZ7dwU=; b=O95XjLCqS4Bql3L5wj9ux/gWUsgDJ/VRjkPjDJF/BEhNRRXmhpsU8G7KU4XPko6aF0 ttHcpljG1sUR85XDyuVCcaYbrWbkddHokx6Aoad8JxgzmSWoiWLGwIEZQxwCTl3jo4fD jTk5uFZjeAUFJo91YpTHhmQIv3MblIqVs33fBlw/yEk4CoqkO+SseuJ/Gt8481c/N86+ EMuYfdTMrBi3BXHb5uZ7d33trYk7KALmHYe8un0XtPf+XEUkTScnkILryyGqWobiE6Qm k6BbSG7Mvlkm2OYvefaOC5ZEwur7A/q9Po7SvIDy7gb8XYiR25fdEQboGpbnZN41db2b nfGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a6552cb000000b0047842533cc4si12947686pgp.838.2023.02.06.23.13.49; Mon, 06 Feb 2023 23:14:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230513AbjBGHJR (ORCPT <rfc822;kmanaouilinux@gmail.com> + 99 others); Tue, 7 Feb 2023 02:09:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230449AbjBGHJJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 7 Feb 2023 02:09:09 -0500 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9764F2278C; Mon, 6 Feb 2023 23:09:07 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=ziyangzhang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0Vb64zG8_1675753744; Received: from localhost.localdomain(mailfrom:ZiyangZhang@linux.alibaba.com fp:SMTPD_---0Vb64zG8_1675753744) by smtp.aliyun-inc.com; Tue, 07 Feb 2023 15:09:04 +0800 From: Ziyang Zhang <ZiyangZhang@linux.alibaba.com> To: axboe@kernel.dk, ming.lei@redhat.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, joseph.qi@linux.alibaba.com, Ziyang Zhang <ZiyangZhang@linux.alibaba.com> Subject: [PATCH RESEND 3/3] ublk: pass NULL to blk_mq_alloc_disk() as queuedata Date: Tue, 7 Feb 2023 15:08:39 +0800 Message-Id: <20230207070839.370817-4-ZiyangZhang@linux.alibaba.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: <20230207070839.370817-1-ZiyangZhang@linux.alibaba.com> References: <20230207070839.370817-1-ZiyangZhang@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757155469168648922?= X-GMAIL-MSGID: =?utf-8?q?1757155469168648922?= |
Series |
cleanup for ublk
|
|
Commit Message
Ziyang Zhang
Feb. 7, 2023, 7:08 a.m. UTC
queuedata is not referenced in ublk_drv and we can use driver_data
instead. Pass NULL to blk_mq_alloc_disk() as queuedata while allocating
ublk's gendisk.
Signed-off-by: Ziyang Zhang <ZiyangZhang@linux.alibaba.com>
---
drivers/block/ublk_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Tue, Feb 07, 2023 at 03:08:39PM +0800, Ziyang Zhang wrote: > queuedata is not referenced in ublk_drv and we can use driver_data > instead. Pass NULL to blk_mq_alloc_disk() as queuedata while allocating > ublk's gendisk. > > Signed-off-by: Ziyang Zhang <ZiyangZhang@linux.alibaba.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Thanks, Ming
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 06eddefdf02a..d83fe2c2b3ba 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -1578,7 +1578,7 @@ static int ublk_ctrl_start_dev(struct ublk_device *ub, struct io_uring_cmd *cmd) goto out_unlock; } - disk = blk_mq_alloc_disk(&ub->tag_set, ub); + disk = blk_mq_alloc_disk(&ub->tag_set, NULL); if (IS_ERR(disk)) { ret = PTR_ERR(disk); goto out_unlock;