Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and driver model

Cornelia Huck
2007-10-10T09:05:43Z

On Tue, 9 Oct 2007 15:26:38 -0700,
Greg KH <greg@kroah.com> wrote:

> > - relaying implementation details to userspace so that they cannot be
> > easily changed. We would need to allow kobjects not showing up in sysfs
> > and making symlinks a sysfs facility not relying on kobjects to help
> > there.
>
> Huh? Why would you want a kobject to not show up in sysfs?

If we consider everything that shows up in sysfs as API, we cannot go
ahead and change it without risking userspace breakage. The hierarchy
of objects may very well be an "implementation detail". Otherwise, we
would need to lay out for every user of the kobject infrastructure
which information userspace can rely on (like it is documented for the
driver model).

> And yes, I agree we could use some more "automatic" help in regards to
> symlinks in sysfs when we change kobjects around. That would make
> things simpler for the kobject core.

Yes, non-automatic symlink handling is a large source of pain and
errors. They should probably be tied to sysfs_dirents instead of
kobjects.

> > > Removing kobject from the interface doesn't change anything about this.
> >
> > Hm. Currently you have a file<->attribute correlation. This would
> > change if you allow non-attribute files.
>
> I don't want to have non-attribute files, that's my main point here.

That's what I tried to say as well :)