Re: [PATCH] fs: Correct SuS compliance for open of large file without options

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Thursday, September 27, 2007 - 2:34 pm

On Thu, Sep 27, 2007 at 02:37:42PM -0400, Theodore Tso wrote:

Ok, how then should I advertise this better?  What can we do better to
help userspace programmers out in this regard?


Me and Pat Mochel sat in that talk and instantly had an "oh shit" moment
when it came to the in-kernel usage of sysfs and the driver model.  Ever
since then, I have been working to change the code to make it better.
With the exception of the recent help from Kay, I am the only one doing
this as Pat has been gone for a few years and isn't coming back.


We (well, Kay mostly) have also been working on fixing this all up to
make it much harder to use sysfs incorrectly.  We will have a single
device tree (well, almost a single tree, it's getting there), so that
all of the information is only in one place, and you don't have to go
searching all over the place for it.  That is a direct improvement over
the old design where somethings were in one place, and others in
another.

And because of the original design mistakes, we have only been able to
change things for the better in a slow manner.  We have had userspace
programs fixed up for _years_ before we are able to make the
corresponding changes in the kernel, so as to not break the distros that
are slow to upgrade packages and kernels (like Debian.)

If I had my druthers, we could instantly put some patches into the tree
to fix up the sysfs "mess" once and for all, creating a unified, single
tree, with only a handful of needed symlinks to be able to categorize
certain things.  We have the patches (Kay wrote them over a year ago),
and userspace programs work just fine with them (udev and HAL), but
because we need to support 5 year old userspace programs running
tomorrows kernel, we must take very tiny, slow steps to get there.

And yes, sysfs has slowly changed over the years, and along the way we
have kept things working, with only very minor problems.  You have no
idea the crazy mismatch of kernels and userspace programs we have had to
deal with.  And it will continue to change, slowly, until we reach the
unified-tree goal, and all of those old crufty userspace programs are
dead and buried (I got a bug report about RHEL's udev version 039 just
yesterday.)

So you can't have it both ways.  You can't complain that sysfs isn't
stable, and isn't "properly userspace friendly" at the same time.  In
order to fix the issues, we have to change it, and do it slowly, because
I don't want to break some distros that can't keep up with the others.

thanks,

greg k-h
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] fs: Correct SuS compliance for open of large f ..., Greg KH, (Thu Sep 27, 2:34 pm)