Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10507082rwp; Thu, 20 Jul 2023 23:37:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlF1fVaHcNvUXgjRemzVPA6MMYtca8FR53U0k44X3fX947pO1UxgJQN00TXA6J/ghnshxWOF X-Received: by 2002:aa7:d98b:0:b0:51f:eee2:20bb with SMTP id u11-20020aa7d98b000000b0051feee220bbmr872443eds.0.1689921475708; Thu, 20 Jul 2023 23:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689921475; cv=none; d=google.com; s=arc-20160816; b=OjFgG3zih/kvaQnz59UQfATmtydazyASYLOAArTZ/BOnAyu5UMlccvsgCz5p19PmOy 0T41BG2SWeSv+tFYG/I3uFCQLUnxVfXwwPAPQ9GvB0N7G3V/VQSyrqkc990CjlSWApE+ sa45K3ne1Gn2dwalUFnyS6cYdpxeDGQfiFu1dOQ0yJ9T5CWqpoZbj3DuCdVNp7ArzHm2 wMHHnSq7LNsOJgbg6nM+8denzAPMolVLpKM+gY97UKpCQBTE2xky+qzdb9oQtqBvdRlC u2cV5aigx/ryrqyMUiUqo/Ll3PrteZun0S0yNpOQzIw2c2YxCevKXIddOFWsK8ivljNi 3zcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5cMFjsR1gg/aYctbXek3Hul1xL000DIf360fcHcDZq0=; fh=+odusicRyVe515r8TMkKGQQRajBH4LYBTPNBKgGC8ho=; b=0V+R/UarBqwr6kkX437KRzGW3+W89wo9Q+btRLzWU38E1Arjzr3SY1FozwrTle3x8c 4GH6kEBKC4oTUJPVvseaIz1cnFdYqAvKZYHplg2oow54ybyjBoIR4mcsVzQ4Futm+1At gvoQQNHXukThGrFFhaM4Fpc2uqc783vtgRibTd/6E+IazppyWfG+NjHCDU7//sa4a9xw NRFPhowiLn3ucMlMf9jTafGGAgxhyNLIHXD64DhtwICc3L7sbIIk3AR9oTrnxNEDDcHR rVnZXHd85dc7lByqz/yvJ17+OTb1WMHTOePxwsGqHfmHHTF8fe5OfaBicCGIuM1TSWNA /9ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=kyKTpFxS; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a24-20020aa7cf18000000b00521d84b39b3si1996752edy.479.2023.07.20.23.37.31; Thu, 20 Jul 2023 23:37:55 -0700 (PDT) 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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=kyKTpFxS; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229902AbjGUGbu (ORCPT + 99 others); Fri, 21 Jul 2023 02:31:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjGUGbt (ORCPT ); Fri, 21 Jul 2023 02:31:49 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25009113; Thu, 20 Jul 2023 23:31:48 -0700 (PDT) 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=5cMFjsR1gg/aYctbXek3Hul1xL000DIf360fcHcDZq0=; b=kyKTpFxSlJgoiOmgdPtET6pghf AN09IKltb5IuvFl1vHeHv2hd/P3mrPkIyoTzMLKk5fc/o1qa66COwHdzRVZ4pp097AN/g6ugHQ4i5 BTGdblPW4oarvroq8hlHm/MzofokmewsNO7Q0QUfet82wvzg9KcaMwh/KKAZC9LIqUL/apna6WDpZ t5iR3TrGC/YEepzPOf1KJPw3KIxIm8esnh4sDyECSG13C+YWS4UoYIpX3x2meBMgXjnfD2BpM9waF pIjWFRlmcxhWhY6YvmOucC2UL1DCBjm0kmh0xJMCP6Z2hG495+XGtEkPxvHnrNxtPtkE/FNZAqMAl GazE8uUg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qMjfO-00D2cj-2W; Fri, 21 Jul 2023 06:31:06 +0000 Date: Thu, 20 Jul 2023 23:31:06 -0700 From: Christoph Hellwig To: Daniel Golle Cc: Christoph Hellwig , Jens Axboe , Ulf Hansson , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dave Chinner , Matthew Wilcox , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Jan Kara , Damien Le Moal , Ming Lei , Min Li , Christian Loehle , Adrian Hunter , Hannes Reinecke , Jack Wang , Florian Fainelli , Yeqi Fu , Avri Altman , Hans de Goede , Ye Bin , Greg Kroah-Hartman , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [RFC PATCH 6/6] block: implement NVMEM provider Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 20, 2023 at 05:02:32PM +0100, Daniel Golle wrote: > On Thu, Jul 20, 2023 at 12:04:43AM -0700, Christoph Hellwig wrote: > > The layering here is exactly the wrong way around. This block device > > as nvmem provide has not business sitting in the block layer and being > > keyed ff the gendisk registration. Instead you should create a new > > nvmem backed that opens the block device as needed if it fits your > > OF description without any changes to the core block layer. > > > > Ok. I will use a class_interface instead. I'm not sure a class_interface makes much sense here. Why does the block layer even need to know about you using a device a nvmem provider? As far as I can tell your provider should layer entirely above the block layer and not have to be integrated with it.