On 2022-07-06 01:04, Greg Kroah-Hartman wrote: > On Wed, Jul 06, 2022 at 08:51:27AM +0200, Christoph Hellwig wrote: >> On Tue, Jul 05, 2022 at 12:16:45PM -0600, Logan Gunthorpe wrote: >>> The current version does it through a char device, but that requires >>> creating a simple_fs and anon_inode for teardown on driver removal, plus >>> a bunch of hooks through the driver that exposes it (NVMe, in this case) >>> to set this all up. >>> >>> Christoph is suggesting a sysfs interface which could potentially avoid >>> the anon_inode and all of the extra hooks. It has some significant >>> benefits and maybe some small downsides, but I wouldn't describe it as >>> horrid. >> >> Yeah, I don't think is is horrible, it fits in with the resource files >> for the BARs, and solves a lot of problems. Greg, can you explain >> what would be so bad about it? > > As you mention, you will have to pass different things down into sysfs > in order for that to be possible. If it matches the resource files like > we currently have today, that might not be that bad, but it still feels > odd to me. Let's see an implementation and a Documentation/ABI/ entry > first though. I'll work something up in the coming weeks. Thanks, Logan