Skip to contentSkip to conversation

to make files of ocfs2 under sysfs canonical

RFC Denis Cheng 4 participants 10 messages Dec 6, 2007 – Dec 13, 2007 OCFS2

lore
Share & tools
lore
#0 lore raw

ocfs2 uses a subsystem under sysfs: /sys/o2cb, which is not good,

the canonical use of sysfs is one kset under /sys/fs, like the approach gfs2 does.

if someone will agree my opinion, I can improve this code.

--
Denis Cheng

#1 lore raw
Quoted 6 lines · Denis Cheng

ocfs2 uses a subsystem under sysfs: /sys/o2cb, which is not good,

the canonical use of sysfs is one kset under /sys/fs, like the approach gfs2 does.

if someone will agree my opinion, I can improve this code.

o2cb is, in theory, independent of the filesystem. Thus, it doesn't necessarily belong under /sys/fs.

The bigger problem is that there are tools expecting /sys/o2cb to be there. We can't just drop it.

Joel

Signature · 7 lines
"Drake!  We're LEAVING!"

Joel Becker
Principal Software Developer
Oracle
E-mail: [email protected]
Phone: (650) 506-8127
author
#2 lore raw
Quoted 8 lines · Joel Becker
Quoted 5 lines · Denis Cheng

ocfs2 uses a subsystem under sysfs: /sys/o2cb, which is not good,

the canonical use of sysfs is one kset under /sys/fs, like the approach gfs2 does.

o2cb is, in theory, independent of the filesystem. Thus, it doesn't necessarily belong under /sys/fs.

I agree it's independent, but /sys/oc2b just don't conform the uniform of the linux kernel sysfs usage.

Quoted 2 lines

The bigger problem is that there are tools expecting /sys/o2cb to be there. We can't just drop it.

Do you mean the ocfs2-tools? We could also change it. Or any other tools?

The kernel community doesn't promise a stable kernel API, so does the sysfs, Except If it would break many userspace tools, we should consider with caution or keep the binary compatibility,

As time goes by, the wrong way shouldn't be continued, we are to make changes sooner or later.

Signature · 1 line
Denis Cheng
#3 lore raw
Quoted 7 lines · rae l
Quoted 2 lines

The bigger problem is that there are tools expecting /sys/o2cb to be there. We can't just drop it.

Do you mean the ocfs2-tools? We could also change it. Or any other tools?

The kernel community doesn't promise a stable kernel API, so does the sysfs, Except If it would break many userspace tools, we should consider with caution or keep the binary compatibility,

It would break ocfs2-tools, majorly. mount.ocfs2, fsck.ocfs2, tunefs.ocfs2, mkfs.ocfs2, o2cb_ctl are just the programs which I can think of off the top of my head which look for o2cb/interface_revision. Basically anything that needs to interact with the cluster uses that file at least once.

So sorry, but shuffling it around would make many Ocfs2 users very, very unhappy.

	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]

#4 lore raw
In reply to rae l
Quoted 5 lines · rae l
Quoted 2 lines · Joel Becker

o2cb is, in theory, independent of the filesystem. Thus, it doesn't necessarily belong under /sys/fs.

I agree it's independent, but /sys/oc2b just don't conform the uniform of the linux kernel sysfs usage.

By your measure. By others, it does. In fact, we asked around
before we put it there.

Quoted 3 lines
Quoted 2 lines

The bigger problem is that there are tools expecting /sys/o2cb to be there. We can't just drop it.

Do you mean the ocfs2-tools? We could also change it. Or any other tools?

I mean ocfs2-tools. We have to deal with existing
installations, not just new tools.

Quoted 3 lines

The kernel community doesn't promise a stable kernel API, so does the sysfs, Except If it would break many userspace tools, we should consider with caution or keep the binary compatibility,

sysfs is a userspace ABI. The kernel *does* try to keep
userspace ABI stable or backwards compatible.

Joel

Signature · 9 lines
"What do you take me for, an idiot?"  
        - General Charles de Gaulle, when a journalist asked him
          if he was happy.

Joel Becker
Principal Software Developer
Oracle
E-mail: [email protected]
Phone: (650) 506-8127
#5 lore raw
In reply to rae l
Quoted 11 lines · rae l
Quoted 8 lines · Joel Becker
Quoted 5 lines · Denis Cheng

ocfs2 uses a subsystem under sysfs: /sys/o2cb, which is not good,

the canonical use of sysfs is one kset under /sys/fs, like the approach gfs2 does.

o2cb is, in theory, independent of the filesystem. Thus, it doesn't necessarily belong under /sys/fs.

I agree it's independent, but /sys/oc2b just don't conform the uniform of the linux kernel sysfs usage.

And what would that be? :)

confused,

greg k-h

author
#6 lore raw
Quoted 8 lines · Greg KH
Quoted 7 lines · rae l
Quoted 6 lines · Joel Becker
Quoted 5 lines · Denis Cheng

ocfs2 uses a subsystem under sysfs: /sys/o2cb, which is not good,

the canonical use of sysfs is one kset under /sys/fs, like the approach gfs2 does.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

o2cb is, in theory, independent of the filesystem. Thus, it doesn't necessarily belong under /sys/fs.

I agree it's independent, but /sys/oc2b just don't conform the uniform of the linux kernel sysfs usage.

And what would that be? :)

The sysfs entries of ocfs2 are under /sys/oc2b, but I think they generally should be under /sys/fs/oc2b, aren't they?

But as Joel said, this change will break ocfs2-tools, so the decision was not made.

Quoted 2 lines · Joel Becker

I mean ocfs2-tools. We have to deal with existing
installations, not just new tools.

To Joel: I mean this change will be done in new kernels, and new ocfs2-tools, old kernel require old ocfs2-tools, that does not break existing installations, is that OK?

Signature · 1 line
Denis Cheng
#7 lore raw
Quoted 9 lines · rae l
Quoted 8 lines · Greg KH
Quoted 7 lines · rae l
Quoted 6 lines · Joel Becker
Quoted 5 lines · Denis Cheng

ocfs2 uses a subsystem under sysfs: /sys/o2cb, which is not good,

the canonical use of sysfs is one kset under /sys/fs, like the approach gfs2 does.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

o2cb is, in theory, independent of the filesystem. Thus, it doesn't necessarily belong under /sys/fs.

I agree it's independent, but /sys/oc2b just don't conform the uniform of the linux kernel sysfs usage.

And what would that be? :)

The sysfs entries of ocfs2 are under /sys/oc2b, but I think they generally should be under /sys/fs/oc2b, aren't they?

Yes, they should be, it looks like someone messed up putting them in the sysfs root directory.

Quoted 2 lines

But as Joel said, this change will break ocfs2-tools, so the decision was not made.

It should be pretty simple to change the tools to work for both places, right?

thanks,

greg k-h

#8 lore raw
Quoted 5 lines · Greg KH
Quoted 2 lines

The sysfs entries of ocfs2 are under /sys/oc2b, but I think they generally should be under /sys/fs/oc2b, aren't they?

Yes, they should be, it looks like someone messed up putting them in the sysfs root directory.

'o2cb' refers to the stuff in ocfs2_nodemanager, so we wanted to keep it out of the fs namespace (think more "cluster" than "file system").

We felt at the time (and still do) that it was better than polluting /sys/fs/ with non file system related things.

Also, I feel that for perspective, I should mention that this layout isn't anything new - we've been doing this for a while.

Quoted 5 lines
Quoted 2 lines

But as Joel said, this change will break ocfs2-tools, so the decision was not made.

It should be pretty simple to change the tools to work for both places, right?

Changing a path (or just testing two of them) isn't a big deal, the problem is that existing versions of ocfs2-tools will break very badly. That's clearly unnaceptable for a production file system.

	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]

#9 lore raw
Quoted 7 lines · Mark Fasheh
Quoted 5 lines · Greg KH
Quoted 2 lines

The sysfs entries of ocfs2 are under /sys/oc2b, but I think they generally should be under /sys/fs/oc2b, aren't they?

Yes, they should be, it looks like someone messed up putting them in the sysfs root directory.

Quoted 8 lines

'o2cb' refers to the stuff in ocfs2_nodemanager, so we wanted to keep it out of the fs namespace (think more "cluster" than "file system").

We felt at the time (and still do) that it was better than polluting /sys/fs/ with non file system related things.

Also, I feel that for perspective, I should mention that this layout isn't anything new - we've been doing this for a while.

Then you all have been ignoring the patches that are in -mm that move this directory under /sys/fs/ for quite some time now :)

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

But as Joel said, this change will break ocfs2-tools, so the decision was not made.

It should be pretty simple to change the tools to work for both places, right?

Changing a path (or just testing two of them) isn't a big deal, the problem is that existing versions of ocfs2-tools will break very badly. That's clearly unnaceptable for a production file system.

Update the tools today, and then let the kernel change happen in a few months. Not that big of a deal.

thanks,

greg k-h