* /sys/block vs. /sys/class/block
@ 2004-12-20 7:08 Benjamin Herrenschmidt
2004-12-20 8:16 ` Nick Piggin
2004-12-20 22:49 ` Greg KH
0 siblings, 2 replies; 15+ messages in thread
From: Benjamin Herrenschmidt @ 2004-12-20 7:08 UTC (permalink / raw)
To: Linux Kernel list; +Cc: Patrick Mochel, Jens Axboe
I'm trying to understand why we have /sys/block instead
of /sys/class/block, and so far, I haven't found a single good argument
justifying it... It just messes up the so far logical layout of sysfs
for no apparent reason.
I also didn't find where /sys/block is created, but that's maybe because
I didn't search too hard :) So I'm not coming up with a patch yet, but
unless somebody can convince me it should stay here, I'll do so soon.
If the reason not to fix it is backward compatibility, then that would
really be a shame we managed already to turn the brand new sysfs into a
mess with no hope of fixing it... If there is really a problem there,
maybe we could move it and keep a compat symlink for a few kernel
revs... ?
Ben.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-20 7:08 /sys/block vs. /sys/class/block Benjamin Herrenschmidt
@ 2004-12-20 8:16 ` Nick Piggin
2004-12-20 9:29 ` Benjamin Herrenschmidt
2004-12-20 22:49 ` Greg KH
1 sibling, 1 reply; 15+ messages in thread
From: Nick Piggin @ 2004-12-20 8:16 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Linux Kernel list, Patrick Mochel, Jens Axboe
Benjamin Herrenschmidt wrote:
> I'm trying to understand why we have /sys/block instead
> of /sys/class/block, and so far, I haven't found a single good argument
> justifying it... It just messes up the so far logical layout of sysfs
> for no apparent reason.
>
> I also didn't find where /sys/block is created, but that's maybe because
> I didn't search too hard :) So I'm not coming up with a patch yet, but
> unless somebody can convince me it should stay here, I'll do so soon.
>
> If the reason not to fix it is backward compatibility, then that would
> really be a shame we managed already to turn the brand new sysfs into a
> mess with no hope of fixing it... If there is really a problem there,
> maybe we could move it and keep a compat symlink for a few kernel
> revs... ?
>
Seems like that's where it belongs.
The reason why it is in /sys/block is because it is apparently a "subsystem",
and using decl_subsys - drivers/block/genhd.c
Nick
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-20 8:16 ` Nick Piggin
@ 2004-12-20 9:29 ` Benjamin Herrenschmidt
2004-12-20 9:44 ` Nick Piggin
0 siblings, 1 reply; 15+ messages in thread
From: Benjamin Herrenschmidt @ 2004-12-20 9:29 UTC (permalink / raw)
To: Nick Piggin; +Cc: Linux Kernel list, Patrick Mochel, Jens Axboe
> Seems like that's where it belongs.
>
> The reason why it is in /sys/block is because it is apparently a "subsystem",
> and using decl_subsys - drivers/block/genhd.c
I'm not convinced ... If you look at how /sys is organized, it really
doesn't make any sense ... block devives are really devices of "class
block", wether we have a block "subsystem" in there is irrelevant imho.
Ben.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-20 9:29 ` Benjamin Herrenschmidt
@ 2004-12-20 9:44 ` Nick Piggin
2004-12-20 9:45 ` Jens Axboe
0 siblings, 1 reply; 15+ messages in thread
From: Nick Piggin @ 2004-12-20 9:44 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Linux Kernel list, Patrick Mochel, Jens Axboe
Benjamin Herrenschmidt wrote:
>>Seems like that's where it belongs.
>>
>>The reason why it is in /sys/block is because it is apparently a "subsystem",
>>and using decl_subsys - drivers/block/genhd.c
>
>
> I'm not convinced ... If you look at how /sys is organized, it really
> doesn't make any sense ... block devives are really devices of "class
> block", wether we have a block "subsystem" in there is irrelevant imho.
>
Sorry to be unclear: I was agreeing with you ;)
I was just pointing out that the reason it is currently /sys/block is
that decl_subsys call.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-20 9:44 ` Nick Piggin
@ 2004-12-20 9:45 ` Jens Axboe
2004-12-20 11:37 ` Jan Engelhardt
0 siblings, 1 reply; 15+ messages in thread
From: Jens Axboe @ 2004-12-20 9:45 UTC (permalink / raw)
To: Nick Piggin; +Cc: Benjamin Herrenschmidt, Linux Kernel list, Patrick Mochel
On Mon, Dec 20 2004, Nick Piggin wrote:
> Benjamin Herrenschmidt wrote:
> >>Seems like that's where it belongs.
> >>
> >>The reason why it is in /sys/block is because it is apparently a
> >>"subsystem",
> >>and using decl_subsys - drivers/block/genhd.c
> >
> >
> >I'm not convinced ... If you look at how /sys is organized, it really
> >doesn't make any sense ... block devives are really devices of "class
> >block", wether we have a block "subsystem" in there is irrelevant imho.
> >
>
> Sorry to be unclear: I was agreeing with you ;)
>
> I was just pointing out that the reason it is currently /sys/block is
> that decl_subsys call.
Ditto, the question is how to move it with as little pain as possible...
I think the symlink approach would be fine.
--
Jens Axboe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-20 9:45 ` Jens Axboe
@ 2004-12-20 11:37 ` Jan Engelhardt
2004-12-20 14:08 ` Jens Axboe
0 siblings, 1 reply; 15+ messages in thread
From: Jan Engelhardt @ 2004-12-20 11:37 UTC (permalink / raw)
To: linux-kernel
>Ditto, the question is how to move it with as little pain as possible...
>I think the symlink approach would be fine.
Wow.. I don't even have /sys/class/block (2.6.9-rc2)
Jan Engelhardt
--
ENOSPC
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-20 11:37 ` Jan Engelhardt
@ 2004-12-20 14:08 ` Jens Axboe
0 siblings, 0 replies; 15+ messages in thread
From: Jens Axboe @ 2004-12-20 14:08 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: linux-kernel
(please follow list etiquette, don't trim cc lists)
On Mon, Dec 20 2004, Jan Engelhardt wrote:
> >Ditto, the question is how to move it with as little pain as possible...
> >I think the symlink approach would be fine.
>
> Wow.. I don't even have /sys/class/block (2.6.9-rc2)
That is Ben's point, it is currently misplaced.
--
Jens Axboe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-20 7:08 /sys/block vs. /sys/class/block Benjamin Herrenschmidt
2004-12-20 8:16 ` Nick Piggin
@ 2004-12-20 22:49 ` Greg KH
2004-12-21 7:07 ` Benjamin Herrenschmidt
1 sibling, 1 reply; 15+ messages in thread
From: Greg KH @ 2004-12-20 22:49 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Linux Kernel list, Patrick Mochel, Jens Axboe
On Mon, Dec 20, 2004 at 08:08:52AM +0100, Benjamin Herrenschmidt wrote:
> I'm trying to understand why we have /sys/block instead
> of /sys/class/block, and so far, I haven't found a single good argument
> justifying it... It just messes up the so far logical layout of sysfs
> for no apparent reason.
Because /sys/block happened before /sys/class did. Al Viro converted
the block layer before I got the struct class stuff working properly
during 2.5.
And yes, I would like to convert the block layer to use the class stuff,
but for right now, I can't as class devices don't allow
sub-classes-devices, and getting to that work is _way_ down on my list
of things to do.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-20 22:49 ` Greg KH
@ 2004-12-21 7:07 ` Benjamin Herrenschmidt
2004-12-22 2:34 ` Daniel Stekloff
2004-12-22 4:34 ` Stephen Rothwell
0 siblings, 2 replies; 15+ messages in thread
From: Benjamin Herrenschmidt @ 2004-12-21 7:07 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel list, Patrick Mochel, Jens Axboe
On Mon, 2004-12-20 at 14:49 -0800, Greg KH wrote:
> On Mon, Dec 20, 2004 at 08:08:52AM +0100, Benjamin Herrenschmidt wrote:
> > I'm trying to understand why we have /sys/block instead
> > of /sys/class/block, and so far, I haven't found a single good argument
> > justifying it... It just messes up the so far logical layout of sysfs
> > for no apparent reason.
>
> Because /sys/block happened before /sys/class did. Al Viro converted
> the block layer before I got the struct class stuff working properly
> during 2.5.
>
> And yes, I would like to convert the block layer to use the class stuff,
> but for right now, I can't as class devices don't allow
> sub-classes-devices, and getting to that work is _way_ down on my list
> of things to do.
but can't we at least artificially move it down to /sys/class anyway for
the sake of a sane userland API ?
Ben.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-21 7:07 ` Benjamin Herrenschmidt
@ 2004-12-22 2:34 ` Daniel Stekloff
2004-12-22 4:34 ` Stephen Rothwell
1 sibling, 0 replies; 15+ messages in thread
From: Daniel Stekloff @ 2004-12-22 2:34 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Greg KH, Linux Kernel list, Patrick Mochel, Jens Axboe
On Mon, 2004-12-20 at 23:07, Benjamin Herrenschmidt wrote:
> On Mon, 2004-12-20 at 14:49 -0800, Greg KH wrote:
> > On Mon, Dec 20, 2004 at 08:08:52AM +0100, Benjamin Herrenschmidt wrote:
> > > I'm trying to understand why we have /sys/block instead
> > > of /sys/class/block, and so far, I haven't found a single good argument
> > > justifying it... It just messes up the so far logical layout of sysfs
> > > for no apparent reason.
> >
> > Because /sys/block happened before /sys/class did. Al Viro converted
> > the block layer before I got the struct class stuff working properly
> > during 2.5.
> >
> > And yes, I would like to convert the block layer to use the class stuff,
> > but for right now, I can't as class devices don't allow
> > sub-classes-devices, and getting to that work is _way_ down on my list
> > of things to do.
>
> but can't we at least artificially move it down to /sys/class anyway for
> the sake of a sane userland API ?
Just as a note, libsysfs treats /sys/block as a class, as if under
/sys/class. We felt that's where it belonged and that's where it will
end up.... eventually.
Thanks,
Dan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-21 7:07 ` Benjamin Herrenschmidt
2004-12-22 2:34 ` Daniel Stekloff
@ 2004-12-22 4:34 ` Stephen Rothwell
2004-12-22 6:20 ` Greg KH
1 sibling, 1 reply; 15+ messages in thread
From: Stephen Rothwell @ 2004-12-22 4:34 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: greg, linux-kernel, mochel, axboe
[-- Attachment #1: Type: text/plain, Size: 931 bytes --]
On Tue, 21 Dec 2004 08:07:50 +0100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > Because /sys/block happened before /sys/class did. Al Viro converted
> > the block layer before I got the struct class stuff working properly
> > during 2.5.
> >
> > And yes, I would like to convert the block layer to use the class stuff,
> > but for right now, I can't as class devices don't allow
> > sub-classes-devices, and getting to that work is _way_ down on my list
> > of things to do.
>
> but can't we at least artificially move it down to /sys/class anyway for
> the sake of a sane userland API ?
Can I then make the obvious suggestion: add a symlink in /sys/class
linking to /sys/block and then reverse the symink once the above work has
been done and /sys/class/block has been created?
Or is that too gross? :-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-22 4:34 ` Stephen Rothwell
@ 2004-12-22 6:20 ` Greg KH
2004-12-23 6:39 ` David Weinehall
0 siblings, 1 reply; 15+ messages in thread
From: Greg KH @ 2004-12-22 6:20 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Benjamin Herrenschmidt, linux-kernel, mochel, axboe
On Wed, Dec 22, 2004 at 03:34:49PM +1100, Stephen Rothwell wrote:
> On Tue, 21 Dec 2004 08:07:50 +0100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > > Because /sys/block happened before /sys/class did. Al Viro converted
> > > the block layer before I got the struct class stuff working properly
> > > during 2.5.
> > >
> > > And yes, I would like to convert the block layer to use the class stuff,
> > > but for right now, I can't as class devices don't allow
> > > sub-classes-devices, and getting to that work is _way_ down on my list
> > > of things to do.
> >
> > but can't we at least artificially move it down to /sys/class anyway for
> > the sake of a sane userland API ?
>
> Can I then make the obvious suggestion: add a symlink in /sys/class
> linking to /sys/block and then reverse the symink once the above work has
> been done and /sys/class/block has been created?
>
> Or is that too gross? :-)
It is gross.
But I guess I should ask, who really cares about this, so late in the
sysfs structure game? Is /sys/block/ really a big problem for anyone?
And if it is, I'd much rather someone make the required driver core
changes to fix this up properly, than just put a symlink to paper over
some userspace issue.
And as Dan said, libsysfs already handles /sys/block just like any other
class structure, so a "sane" userland API already exists that fixes this
issue for you.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-22 6:20 ` Greg KH
@ 2004-12-23 6:39 ` David Weinehall
2004-12-23 6:55 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 15+ messages in thread
From: David Weinehall @ 2004-12-23 6:39 UTC (permalink / raw)
To: Greg KH
Cc: Stephen Rothwell, Benjamin Herrenschmidt, linux-kernel, mochel,
axboe
On Tue, Dec 21, 2004 at 10:20:57PM -0800, Greg KH wrote:
[snip]
> It is gross.
Indeed.
> But I guess I should ask, who really cares about this, so late in the
> sysfs structure game? Is /sys/block/ really a big problem for anyone?
> And if it is, I'd much rather someone make the required driver core
> changes to fix this up properly, than just put a symlink to paper over
> some userspace issue.
Maybe because *for once* it'd be nice to actually have inconsistencies
gotten rid of in their relative infancy instead of waiting 10 years
and then having to explain them as existing only for hysterical
raisins...
[snip]
Regards: David Weinehall
--
/) David Weinehall <tao@acc.umu.se> /) Northern lights wander (\
// Maintainer of the v2.0 kernel // Dance across the winter sky //
\) http://www.acc.umu.se/~tao/ (/ Full colour fire (/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-23 6:39 ` David Weinehall
@ 2004-12-23 6:55 ` Benjamin Herrenschmidt
2005-01-06 23:14 ` Greg KH
0 siblings, 1 reply; 15+ messages in thread
From: Benjamin Herrenschmidt @ 2004-12-23 6:55 UTC (permalink / raw)
To: David Weinehall
Cc: Greg KH, Stephen Rothwell, Linux Kernel list, Patrick Mochel,
Jens Axboe
> > But I guess I should ask, who really cares about this, so late in the
> > sysfs structure game? Is /sys/block/ really a big problem for anyone?
> > And if it is, I'd much rather someone make the required driver core
> > changes to fix this up properly, than just put a symlink to paper over
> > some userspace issue.
>
> Maybe because *for once* it'd be nice to actually have inconsistencies
> gotten rid of in their relative infancy instead of waiting 10 years
> and then having to explain them as existing only for hysterical
> raisins...
Agreed.
Ben.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: /sys/block vs. /sys/class/block
2004-12-23 6:55 ` Benjamin Herrenschmidt
@ 2005-01-06 23:14 ` Greg KH
0 siblings, 0 replies; 15+ messages in thread
From: Greg KH @ 2005-01-06 23:14 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: David Weinehall, Stephen Rothwell, Linux Kernel list,
Patrick Mochel, Jens Axboe
On Thu, Dec 23, 2004 at 07:55:33AM +0100, Benjamin Herrenschmidt wrote:
>
> > > But I guess I should ask, who really cares about this, so late in the
> > > sysfs structure game? Is /sys/block/ really a big problem for anyone?
> > > And if it is, I'd much rather someone make the required driver core
> > > changes to fix this up properly, than just put a symlink to paper over
> > > some userspace issue.
> >
> > Maybe because *for once* it'd be nice to actually have inconsistencies
> > gotten rid of in their relative infancy instead of waiting 10 years
> > and then having to explain them as existing only for hysterical
> > raisins...
>
> Agreed.
-ENOPATCH :)
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2005-01-06 23:39 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-20 7:08 /sys/block vs. /sys/class/block Benjamin Herrenschmidt
2004-12-20 8:16 ` Nick Piggin
2004-12-20 9:29 ` Benjamin Herrenschmidt
2004-12-20 9:44 ` Nick Piggin
2004-12-20 9:45 ` Jens Axboe
2004-12-20 11:37 ` Jan Engelhardt
2004-12-20 14:08 ` Jens Axboe
2004-12-20 22:49 ` Greg KH
2004-12-21 7:07 ` Benjamin Herrenschmidt
2004-12-22 2:34 ` Daniel Stekloff
2004-12-22 4:34 ` Stephen Rothwell
2004-12-22 6:20 ` Greg KH
2004-12-23 6:39 ` David Weinehall
2004-12-23 6:55 ` Benjamin Herrenschmidt
2005-01-06 23:14 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).