From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 817E370 for ; Fri, 21 May 2021 17:28:44 +0000 (UTC) Received: by mail-pj1-f53.google.com with SMTP id n6-20020a17090ac686b029015d2f7aeea8so7713761pjt.1 for ; Fri, 21 May 2021 10:28:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=B30rffgHFLYBI6xwi77IEdIESyslCgwa8HluqL6arQs=; b=T8feKoYxtDu6n3v3HPwVM6vL02GwZdUZdIHqi3Y30q37Bpoy6MrywYK4r/HRZlSmsG +4OB944tmvNahN9HF2o+T74Pi+9m6guxheX/1cnq/NdW+1Z40l0iV3sV+FG0Lx9dEy6N Qcfw11x7BtI8LGUPsIaeAHXZffD8fVlwgj1psvvS7jXmLjmRKNlgQ4dXyWM7fBgeaXC1 8w51Q8inoY3LOvNWvr2LHfKofF7SGd5QpEgi+GsrTHl+Oe42xGJpLQMxHe6VqlDClm1f Jhg2pvPeClq6jNmVofLnqpf6IwlbzxoFQ1P3h9NebgTMmq7VteFY2dx85FPsrl8wuU9G +Hnw== X-Gm-Message-State: AOAM530mjmYq1pavbybAchsEyIjY5orACE0l6eNq0qULp5AYY/xRKzbo QtXjvrVpt32yptdzuv5jT6M= X-Google-Smtp-Source: ABdhPJyrNWjuuiPeUt5pQpc8nPl0WeqbdGuJLCj1G2mOrwbN4glaACuKyX0vSa0sudDl68ZR50luTQ== X-Received: by 2002:a17:902:e8c8:b029:ee:f249:e416 with SMTP id v8-20020a170902e8c8b02900eef249e416mr13149158plg.3.1621618124047; Fri, 21 May 2021 10:28:44 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id p19sm2008772pgi.59.2021.05.21.10.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 10:28:42 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 77877423A3; Fri, 21 May 2021 17:28:41 +0000 (UTC) Date: Fri, 21 May 2021 17:28:41 +0000 From: Luis Chamberlain To: Christoph Hellwig Cc: Jens Axboe , Geert Uytterhoeven , Chris Zankel , Max Filippov , Philipp Reisner , Lars Ellenberg , Jim Paris , Joshua Morris , Philip Kelleher , Minchan Kim , Nitin Gupta , Matias Bjorling , Coly Li , Mike Snitzer , Song Liu , Maxim Levitsky , Alex Dubov , Ulf Hansson , Dan Williams , Vishal Verma , Dave Jiang , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-xtensa@linux-xtensa.org, linux-m68k@vger.kernel.org, linux-raid@vger.kernel.org, nvdimm@lists.linux.dev, linux-s390@vger.kernel.org, linux-mmc@vger.kernel.org, linux-bcache@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, dm-devel@redhat.com, drbd-dev@tron.linbit.com, linuxppc-dev@lists.ozlabs.org Subject: Re: [dm-devel] [PATCH 04/26] block: add a flag to make put_disk on partially initalized disks safer Message-ID: <20210521172841.GA25211@42.do-not-panic.com> References: <20210521055116.1053587-1-hch@lst.de> <20210521055116.1053587-5-hch@lst.de> X-Mailing-List: nvdimm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210521055116.1053587-5-hch@lst.de> On Fri, May 21, 2021 at 07:50:54AM +0200, Christoph Hellwig wrote: > Add a flag to indicate that __device_add_disk did grab a queue reference > so that disk_release only drops it if we actually had it. This sort > out one of the major pitfals with partially initialized gendisk that > a lot of drivers did get wrong or still do. > > Signed-off-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Luis 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=-9.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,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 670AEC04FF3 for ; Mon, 24 May 2021 19:48:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2B06E61004 for ; Mon, 24 May 2021 19:48:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B06E61004 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2EsGy0xRn04GxEqlV1e9q/ZGmt5nehTzuuggh/d2Sls=; b=vYfkzEmlvse9OW Kigw/DaR9y7oiJf4IUr+lVhc6bzIwGkpN2jDok6yQ8ervcaJ/RBo4s+X49O+zjxfrqacx00yEDJ40 1Bt74jEw4guKUhBz01Q3MHSK9UI2OSlHNSqyvnCWlvlULyx1y+cfw2E+h2c8A0C1W7+ZguF9i0Sgu CtZ9LeDFVmeguPsxD4aATDArdXzYFuPDZfuMkuGUPtUNUNg1XPjim/Xe+mtyOJJvkudtTs5nbyoLh kfjWm8scOlt2TEjwbGxJRCXoL00f8pnam7ymKp4vqvbOXKz8T8ko4RIOylV/VQ/X+/7Um8cmLDqcI 7huqv31Z8WTCzLQyYf3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1llGYZ-001jib-Gv; Mon, 24 May 2021 19:48:07 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk8x5-000VMI-2t for linux-nvme@desiato.infradead.org; Fri, 21 May 2021 17:28:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=B30rffgHFLYBI6xwi77IEdIESyslCgwa8HluqL6arQs=; b=YqEjjq2peiqHtyW91B7+33KW8/ KaLPzj0E8jm/KMW24364NEMcnpFpUd4z1Gi7+py/r3iUcWlDcNWHtXHprqzXpUeYCwLCIsMzDMnAf 8E4EQwLgTEChDq5YWnbfpmxW/+tt5NX93GCiO/k0Mpotpm4Y1bHfYU2MitQfYSyFFg/ziw9RqS92h Ult3bMGtkYDMR4MW1oEilchExJF1Ik+8Ro+w6Qt3vZzjIZPBnNy9BT6+9rB+uMg+TU3lax95TJhvJ bq/1LUDCkYAijbZqUlwIth47r6X8HKcu+MaeVXIqOeYcswb6DaZeIfAqZqb3RWU7/ju0e3CqLU9FC 6+bC0pfQ==; Received: from mail-pj1-f45.google.com ([209.85.216.45]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lk8x2-00HJTd-LL for linux-nvme@lists.infradead.org; Fri, 21 May 2021 17:28:45 +0000 Received: by mail-pj1-f45.google.com with SMTP id cu11-20020a17090afa8bb029015d5d5d2175so7702066pjb.3 for ; Fri, 21 May 2021 10:28:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=B30rffgHFLYBI6xwi77IEdIESyslCgwa8HluqL6arQs=; b=fPNFRdsoCIf5ToGsHO2213yzkLbczYEmskzlL2hAhITYA9SKYN4IDee9FFgnXZb4dV s1D1CdvFDlXrBk8WA5zLDFU/8ydBhcdn0Aen69tmxUr2PVmdS2JbusbpdBpuWz4fvend 63UK67YZkj4cfY9TlHnjKHMy/A2x0DJR4CrMURgjqAyQAqBVJYRiC2duMaYrASMftu6U eEopn/UKe/j0QgOmqhZq2NacsIBm1085tYr3tL5R/cMZe7ggK2hUwvlViIZ3/TYl5t5g /T/09EognEUIJmF6POvX48OMMWtYOr3EJ4Ncy/LAwIQlI2oavpXCJppjIcKz1WvhUkQB YFrQ== X-Gm-Message-State: AOAM532S7HnMS45ErCmD6P90H+CQcDL2QC6/KyIUeQiPaVj5Oxy7YCBk u04m4Eu3x9ALs9y8pRq4hjU= X-Google-Smtp-Source: ABdhPJyrNWjuuiPeUt5pQpc8nPl0WeqbdGuJLCj1G2mOrwbN4glaACuKyX0vSa0sudDl68ZR50luTQ== X-Received: by 2002:a17:902:e8c8:b029:ee:f249:e416 with SMTP id v8-20020a170902e8c8b02900eef249e416mr13149158plg.3.1621618124047; Fri, 21 May 2021 10:28:44 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id p19sm2008772pgi.59.2021.05.21.10.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 10:28:42 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 77877423A3; Fri, 21 May 2021 17:28:41 +0000 (UTC) Date: Fri, 21 May 2021 17:28:41 +0000 From: Luis Chamberlain To: Christoph Hellwig Cc: Jens Axboe , Geert Uytterhoeven , Chris Zankel , Max Filippov , Philipp Reisner , Lars Ellenberg , Jim Paris , Joshua Morris , Philip Kelleher , Minchan Kim , Nitin Gupta , Matias Bjorling , Coly Li , Mike Snitzer , Song Liu , Maxim Levitsky , Alex Dubov , Ulf Hansson , Dan Williams , Vishal Verma , Dave Jiang , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-xtensa@linux-xtensa.org, linux-m68k@vger.kernel.org, linux-raid@vger.kernel.org, nvdimm@lists.linux.dev, linux-s390@vger.kernel.org, linux-mmc@vger.kernel.org, linux-bcache@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, dm-devel@redhat.com, drbd-dev@tron.linbit.com, linuxppc-dev@lists.ozlabs.org Subject: Re: [dm-devel] [PATCH 04/26] block: add a flag to make put_disk on partially initalized disks safer Message-ID: <20210521172841.GA25211@42.do-not-panic.com> References: <20210521055116.1053587-1-hch@lst.de> <20210521055116.1053587-5-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210521055116.1053587-5-hch@lst.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210521_102844_718264_2B044646 X-CRM114-Status: GOOD ( 13.68 ) X-Mailman-Approved-At: Mon, 24 May 2021 11:59:45 -0700 X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org On Fri, May 21, 2021 at 07:50:54AM +0200, Christoph Hellwig wrote: > Add a flag to indicate that __device_add_disk did grab a queue reference > so that disk_release only drops it if we actually had it. This sort > out one of the major pitfals with partially initialized gendisk that > a lot of drivers did get wrong or still do. > > Signed-off-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Luis _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme 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=-9.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 F1C65C4707A for ; Fri, 21 May 2021 17:29:08 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 7E31661168 for ; Fri, 21 May 2021 17:29:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E31661168 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FmtrM1G5yz3bx4 for ; Sat, 22 May 2021 03:29:07 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.216.48; helo=mail-pj1-f48.google.com; envelope-from=mcgrof@gmail.com; receiver=) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Fmtqy4HsKz305w for ; Sat, 22 May 2021 03:28:45 +1000 (AEST) Received: by mail-pj1-f48.google.com with SMTP id kr9so3258547pjb.5 for ; Fri, 21 May 2021 10:28:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=B30rffgHFLYBI6xwi77IEdIESyslCgwa8HluqL6arQs=; b=XWppWywbOuN8mRgCa8blE9LAix2Z4rf8lAxBEVnDrqFq8CcSPT/eoy/lncD/cSgWqn mp2ktZZvqk403pJQBfzZiFXVVopzc8GxXVEUsfso1zSeubAD9NDLL6ayrcFlU2NhckV/ ZtF6Q+OB0hD7oC7BHv0sXYkIbuP6BIpZyU1s1AeSTBnz8kUBa5D7OdkN6NtFt43Ilx8o BaeZuwJmbkfjsDpA3BsrSIkzyZSPOnOvul1sWHKjP9fOqyYKyVmvNBxGh/6pzn9BDLa4 JQTb1Z2YVz3pWkHRw6WN6BmfxMlylNFTAyAQeB7DxtmZQ1yfRIqv0CUY20Cc7XI2MYWM 5UZg== X-Gm-Message-State: AOAM530ETN79RfvptiGNr6JSAnkKE2SdDvbVix66S3m7kT2XJTpf3FgY Cx4TlrbDpQOzbDxFRMpzRSY= X-Google-Smtp-Source: ABdhPJyrNWjuuiPeUt5pQpc8nPl0WeqbdGuJLCj1G2mOrwbN4glaACuKyX0vSa0sudDl68ZR50luTQ== X-Received: by 2002:a17:902:e8c8:b029:ee:f249:e416 with SMTP id v8-20020a170902e8c8b02900eef249e416mr13149158plg.3.1621618124047; Fri, 21 May 2021 10:28:44 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id p19sm2008772pgi.59.2021.05.21.10.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 10:28:42 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 77877423A3; Fri, 21 May 2021 17:28:41 +0000 (UTC) Date: Fri, 21 May 2021 17:28:41 +0000 From: Luis Chamberlain To: Christoph Hellwig Subject: Re: [dm-devel] [PATCH 04/26] block: add a flag to make put_disk on partially initalized disks safer Message-ID: <20210521172841.GA25211@42.do-not-panic.com> References: <20210521055116.1053587-1-hch@lst.de> <20210521055116.1053587-5-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210521055116.1053587-5-hch@lst.de> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nvdimm@lists.linux.dev, Ulf Hansson , Mike Snitzer , linux-m68k@vger.kernel.org, linux-nvme@lists.infradead.org, Song Liu , dm-devel@redhat.com, Joshua Morris , linux-s390@vger.kernel.org, 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-raid@vger.kernel.org, linux-bcache@vger.kernel.org, linux-block@vger.kernel.org, drbd-dev@tron.linbit.com, Philip Kelleher , Dan Williams , Jens Axboe , Chris Zankel , Max Filippov , linux-mmc@vger.kernel.org, Philipp Reisner , Jim Paris , Minchan Kim , Lars Ellenberg , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, May 21, 2021 at 07:50:54AM +0200, Christoph Hellwig wrote: > Add a flag to indicate that __device_add_disk did grab a queue reference > so that disk_release only drops it if we actually had it. This sort > out one of the major pitfals with partially initialized gendisk that > a lot of drivers did get wrong or still do. > > Signed-off-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Luis 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=-9.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, 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 F35ABC47085 for ; Mon, 24 May 2021 06:47:47 +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 846A361090 for ; Mon, 24 May 2021 06:47:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 846A361090 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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-503-8VEnEyAEM6uN042JIt2NwQ-1; Mon, 24 May 2021 02:47:43 -0400 X-MC-Unique: 8VEnEyAEM6uN042JIt2NwQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1E9CE107ACF2; Mon, 24 May 2021 06:47:38 +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 02247500D9; Mon, 24 May 2021 06:47:38 +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 C6AF755355; Mon, 24 May 2021 06:47:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14LHSqdn023846 for ; Fri, 21 May 2021 13:28:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 659F610AF41F; Fri, 21 May 2021 17:28:52 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6016810BBCD5 for ; Fri, 21 May 2021 17:28:49 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 947198007AC for ; Fri, 21 May 2021 17:28:49 +0000 (UTC) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-594-alz556vgN_KYC2l9r_lc1Q-1; Fri, 21 May 2021 13:28:45 -0400 X-MC-Unique: alz556vgN_KYC2l9r_lc1Q-1 Received: by mail-pj1-f53.google.com with SMTP id n6-20020a17090ac686b029015d2f7aeea8so7713759pjt.1; Fri, 21 May 2021 10:28:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=B30rffgHFLYBI6xwi77IEdIESyslCgwa8HluqL6arQs=; b=T4PIRpY0UX7QSkcH6vHhl5+JUFOjyXZadHZRVX/zECaCJZgaWIyHAENXTZfZrQ24yd YmT3d9zCLOMdVniD8flC2rU6C9F1XQaujQDP6jy5La8Mi06/fMOgPnVAA0SRbmxERK4q NrEJSc/Kyn0IlKm4tQ0VNKeFkcQ4G6IH2bUo2ZXAaaKRDbgRJuRsuBHFGKG4os3uLdcI 1hZ1h2cTW2If+OMWSviYNwOZHuZiOsYQz3XIauJ4lrPymjncXyIcWIBqyDubMIMv5gLh niMDmqq0VwxcUPUyODNSxjeagzA3IcNnNkHqDMllREo/WBVHtaEHLU6dFVgs77kjKMiN hrPA== X-Gm-Message-State: AOAM533l7eJ3rcdSbonzOa8NHXfiLkITfIyRVJ6e4HyRZ3wBAV0G7l7V j8RvxQbU2WWopDSayQfbm14= X-Google-Smtp-Source: ABdhPJyrNWjuuiPeUt5pQpc8nPl0WeqbdGuJLCj1G2mOrwbN4glaACuKyX0vSa0sudDl68ZR50luTQ== X-Received: by 2002:a17:902:e8c8:b029:ee:f249:e416 with SMTP id v8-20020a170902e8c8b02900eef249e416mr13149158plg.3.1621618124047; Fri, 21 May 2021 10:28:44 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id p19sm2008772pgi.59.2021.05.21.10.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 10:28:42 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 77877423A3; Fri, 21 May 2021 17:28:41 +0000 (UTC) Date: Fri, 21 May 2021 17:28:41 +0000 From: Luis Chamberlain To: Christoph Hellwig Message-ID: <20210521172841.GA25211@42.do-not-panic.com> References: <20210521055116.1053587-1-hch@lst.de> <20210521055116.1053587-5-hch@lst.de> MIME-Version: 1.0 In-Reply-To: <20210521055116.1053587-5-hch@lst.de> 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.3 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Mon, 24 May 2021 02:47:09 -0400 Cc: nvdimm@lists.linux.dev, Ulf Hansson , Mike Snitzer , linux-m68k@vger.kernel.org, linux-nvme@lists.infradead.org, Song Liu , dm-devel@redhat.com, Joshua Morris , linux-s390@vger.kernel.org, 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-raid@vger.kernel.org, linux-bcache@vger.kernel.org, linux-block@vger.kernel.org, drbd-dev@tron.linbit.com, Philip Kelleher , Dan Williams , Jens Axboe , Chris Zankel , Max Filippov , linux-mmc@vger.kernel.org, Philipp Reisner , Jim Paris , Minchan Kim , Lars Ellenberg , linuxppc-dev@lists.ozlabs.org Subject: Re: [dm-devel] [PATCH 04/26] block: add a flag to make put_disk on partially initalized disks safer 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.12 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-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Fri, May 21, 2021 at 07:50:54AM +0200, Christoph Hellwig wrote: > Add a flag to indicate that __device_add_disk did grab a queue reference > so that disk_release only drops it if we actually had it. This sort > out one of the major pitfals with partially initialized gendisk that > a lot of drivers did get wrong or still do. > > Signed-off-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Luis -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel