public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Daniel Golle <daniel@makrotopia.org>
Cc: "Christoph Hellwig" <hch@infradead.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	"Jens Axboe" <axboe@kernel.dk>,
	"Hauke Mehrtens" <hauke@hauke-m.de>,
	"Felix Fietkau" <nbd@nbd.name>,
	"Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
	"Dave Chinner" <dchinner@redhat.com>, "Jan Kara" <jack@suse.cz>,
	"Christian Brauner" <brauner@kernel.org>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	"Al Viro" <viro@zeniv.linux.org.uk>,
	"Li Lingfeng" <lilingfeng3@huawei.com>,
	"Christian Heusel" <christian@heusel.eu>,
	"Min Li" <min15.li@samsung.com>,
	"Avri Altman" <avri.altman@wdc.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Hannes Reinecke" <hare@suse.de>,
	"Mikko Rapeli" <mikko.rapeli@linaro.org>,
	"Yeqi Fu" <asuk4.q@gmail.com>,
	"Victor Shih" <victor.shih@genesyslogic.com.tw>,
	"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
	"Li Zhijian" <lizhijian@fujitsu.com>,
	"Ricardo B. Marliere" <ricardo@marliere.net>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mmc@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH v4 3/4] block: add support for notifications
Date: Fri, 28 Jun 2024 05:50:20 -0700	[thread overview]
Message-ID: <Zn6xjP8eH470wWXC@infradead.org> (raw)
In-Reply-To: <Zn6rU-mCYQcyCkGT@makrotopia.org>

On Fri, Jun 28, 2024 at 01:23:47PM +0100, Daniel Golle wrote:
> So that's what I did consequently. Using the notification interface
> the NVMEM driver can live in drivers/nvmem/ and doesn't need to be
> using block internals.
> 
> > And not actually having a user for it is a complete no-go.
> > 
> 
> The user will be the nvmem provider, you can see the code in earlier
> versions of the patchset where I had included it:
> 
> https://patchwork.kernel.org/project/linux-block/patch/96554d6b4d9fa72f936c2c476eb0b023cdd60a64.1717031992.git.daniel@makrotopia.org/
> 
> Being another subsystem I thought it'd be better to deal with the
> block related things first, and once that has been sorted out I will
> move on to add the NVMEM driver and make the necessary changes for
> using it on eMMC.

It is rather hard to review an interface without the users.

I still dislike the idea of notifications from bdev discovery /
partition scanning into the users of them.  We have one such users
in the MD legacy autodetect code, but that has largely been considered
at bad idea and distros tend to use mdadm based assembly from initramfs
instead.  Which IMHO feels like the right thing for nvmem as well,
just have an nvmem provider that opens a file for a user provided
path and use kernel_read on it.  This can covered block devices,
character devices and even regular files.  It will require initramfs
support, but that is pretty much used everywhere for storage discovery
and setup anyway.

  reply	other threads:[~2024-06-28 12:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27 20:49 [PATCH v4 0/4] block: preparations for NVMEM provider Daniel Golle
2024-06-27 20:50 ` [PATCH v4 1/4] dt-bindings: block: add basic bindings for block devices Daniel Golle
2024-06-27 20:50 ` [PATCH v4 2/4] block: partitions: populate fwnode Daniel Golle
2024-06-28  4:44   ` Christoph Hellwig
2024-06-28 12:16     ` Daniel Golle
2024-06-28 12:41       ` Christoph Hellwig
2024-06-27 20:50 ` [PATCH v4 3/4] block: add support for notifications Daniel Golle
2024-06-28  4:45   ` Christoph Hellwig
2024-06-28 12:23     ` Daniel Golle
2024-06-28 12:50       ` Christoph Hellwig [this message]
2024-06-28 14:00         ` Daniel Golle
2024-07-01  5:54           ` Christoph Hellwig
2024-06-27 20:51 ` [PATCH v4 4/4] block: add new genhd flag GENHD_FL_NVMEM Daniel Golle
2024-06-27 22:15 ` [PATCH v4 0/4] block: preparations for NVMEM provider Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zn6xjP8eH470wWXC@infradead.org \
    --to=hch@infradead.org \
    --cc=adrian.hunter@intel.com \
    --cc=asuk4.q@gmail.com \
    --cc=avri.altman@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=christian@heusel.eu \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=conor+dt@kernel.org \
    --cc=daniel@makrotopia.org \
    --cc=dchinner@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hare@suse.de \
    --cc=hauke@hauke-m.de \
    --cc=jack@suse.cz \
    --cc=krzk+dt@kernel.org \
    --cc=lilingfeng3@huawei.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=lizhijian@fujitsu.com \
    --cc=mikko.rapeli@linaro.org \
    --cc=min15.li@samsung.com \
    --cc=nbd@nbd.name \
    --cc=ricardo@marliere.net \
    --cc=robh@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=ulf.hansson@linaro.org \
    --cc=victor.shih@genesyslogic.com.tw \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox