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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38956EB64DD for ; Fri, 21 Jul 2023 06:31:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229593AbjGUGbt (ORCPT ); Fri, 21 Jul 2023 02:31:49 -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 Precedence: bulk List-ID: X-Mailing-List: linux-block@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.