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=-13.8 required=3.0 tests=BAYES_00, 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 527EBC47082 for ; Mon, 7 Jun 2021 04:43:39 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C9F846121E for ; Mon, 7 Jun 2021 04:43:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9F846121E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com 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-385-YOdKKn62MsudalLibVJ5KA-1; Mon, 07 Jun 2021 00:43:35 -0400 X-MC-Unique: YOdKKn62MsudalLibVJ5KA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4F617802690; Mon, 7 Jun 2021 04:43:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A2CC5D9C0; Mon, 7 Jun 2021 04:43:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EA8413CAA; Mon, 7 Jun 2021 04:43:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1574hLl5012930 for ; Mon, 7 Jun 2021 00:43:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4C00C2162386; Mon, 7 Jun 2021 04:43:21 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 47D7D2162381 for ; Mon, 7 Jun 2021 04:43:17 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CC9C11825066 for ; Mon, 7 Jun 2021 04:43:17 +0000 (UTC) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-373-2pUVoEE5MZqk6lgRMVF6_A-1; Mon, 07 Jun 2021 00:43:15 -0400 X-MC-Unique: 2pUVoEE5MZqk6lgRMVF6_A-1 Received: by mail-pl1-f182.google.com with SMTP id e7so7943965plj.7 for ; Sun, 06 Jun 2021 21:43:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CRj471fcopWwQDLwVjladgw5/TWtqNQ37b4ozfCN7s8=; b=eMAfSVaUGYrhsxn3iCjZGS1BJz1kcfTx0CKaz7hmVgFEbT3Gy7QcF7/fsm9Y67XjAH 0IlmRbOH3GCUY7tlFZH3PeLgf5m6eQHbG61Tzcyo2t4Aa9x47YZ1v4YLtwrBwizctOU9 3fN5PhcqbNvBLVdlZb4qHjAhwgtH6AMQge/TnvY7BwiUnKbQ8BPIiiwSUWCdhFFapSMF ghpVvDKoUVKlaqyaUddTmfKQz2lhJQ0bWXdlKEa/9Mm6yI4isKAhJrA4oPdfCavZic2c GLq32+wm0o8TgtWvsybupRjzFsoz1OGisFWj6KT6kCO9TZXKaf9/1rIHXfOR0ODtuD85 1Jkw== X-Gm-Message-State: AOAM530Mq+gJt0ivlzSXHpqf8Oka5Fo+PSx9cLoJxifYtfr8uLbyjCg7 lXDJeQ+/H9v3MObIqFkCO6TwVHxcgGgLOTk/SqR+UQ== X-Google-Smtp-Source: ABdhPJylkfr3HkdoqNF9xRMFqCn7oO5cpDCL+nuDgN1ppB6ZETr18hlSAOgBmuySRxZfODa5nUP7K4JpxKKLUl+WZPE= X-Received: by 2002:a17:902:f1cb:b029:10c:5c6d:88b with SMTP id e11-20020a170902f1cbb029010c5c6d088bmr16307416plc.52.1623040994149; Sun, 06 Jun 2021 21:43:14 -0700 (PDT) MIME-Version: 1.0 References: <20210521055116.1053587-1-hch@lst.de> <20210521055116.1053587-18-hch@lst.de> In-Reply-To: <20210521055116.1053587-18-hch@lst.de> From: Dan Williams Date: Sun, 6 Jun 2021 21:43:03 -0700 Message-ID: To: Christoph Hellwig X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: dm-devel@redhat.com Cc: Sachin Sant , nvdimm@lists.linux.dev, Ulf Hansson , Mike Snitzer , linux-m68k@vger.kernel.org, linux-nvme@lists.infradead.org, Song Liu , device-mapper development , Joshua Morris , linux-s390 , Dave Jiang , Maxim Levitsky , Vishal Verma , Christian Borntraeger , Geert Uytterhoeven , Matias Bjorling , Nitin Gupta , Vasily Gorbik , linux-xtensa@linux-xtensa.org, Alex Dubov , Heiko Carstens , Coly Li , linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, drbd-dev@tron.linbit.com, Philip Kelleher , Jens Axboe , Chris Zankel , linux-raid , Max Filippov , linux-mmc@vger.kernel.org, Philipp Reisner , Jim Paris , Minchan Kim , Lars Ellenberg , linuxppc-dev Subject: Re: [dm-devel] [PATCH 17/26] nvdimm-pmem: convert to blk_alloc_disk/blk_cleanup_disk X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit [ add Sachin who reported this commit in -next ] On Thu, May 20, 2021 at 10:52 PM Christoph Hellwig wrote: > > Convert the nvdimm-pmem driver to use the blk_alloc_disk and > blk_cleanup_disk helpers to simplify gendisk and request_queue > allocation. > > Signed-off-by: Christoph Hellwig > --- > drivers/nvdimm/pmem.c | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > > diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c > index 968b8483c763..9fcd05084564 100644 > --- a/drivers/nvdimm/pmem.c > +++ b/drivers/nvdimm/pmem.c > @@ -338,7 +338,7 @@ static void pmem_pagemap_cleanup(struct dev_pagemap *pgmap) > struct request_queue *q = > container_of(pgmap->ref, struct request_queue, q_usage_counter); > > - blk_cleanup_queue(q); > + blk_cleanup_disk(queue_to_disk(q)); This is broken. This comes after del_gendisk() which means the queue device is no longer associated with its disk parent. Perhaps @pmem could be stashed in pgmap->owner and then this can use pmem->disk? Not see any other readily available ways to get back to the disk from here after del_gendisk(). -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel