Re: 2.1.118 Tons of oopes

Richard Gooch (rgooch@atnf.csiro.au)
Mon, 31 Aug 1998 16:25:06 +1000


Jamie Lokier writes:
> Richard Gooch wrote:
> > Fixing the NFS bug was good. It could have been fixed without breaking
> > any source code. Linus chose to break things for maintainability
> > reasons, which Doug has finally explained. I've made a suggestion
> > which I hope will give him the maintainability goals he wishes but
> > also avoids breakage. If he likes this approach, I'll send a patch.
>
> Your suggestion is a nice one and it would avoid the breakage. However
> as a means to inform driver writers that they might be interested in
> implementing such an important operation as flush, it doesn't do that.
> An announcement on the list would be lost in the noise.
>
> There is a compromise that might satisfy everyone though.
> How about this?
>
> 1. Use the GCC member initialiser syntax if you want in your
> own drivers. It's nice and clear.
>
> (Caveat to C++ driver writers: Back in GCC 2.7.2.1 it _ignored_
> the names in C++, with no warning. I don't know if that still
> applies).
>
> 2. When an _important_ operation is added that driver writers should
> take not of, like flush, it should be explicitly added to all
> the ops initialisers by name if necessary. It isn't necessary to
> compile, it just informs authors that something is new and they
> ought to consider implementing it.
>
> This way, there will still be NULL members in ops initialisers,
> indicating that a driver doesn't implement some _important_ operation.

This isn't what Linus wants, though. He wants to break drivers when a
new method is introduced. Using the GCC extension will in fact prevent
him from breaking things, so I don't expect he'll like that.

Note that there is another (i.e. non-maintenance issue) benefit to his
policy: it would allow us to implement dummy VFS methods which *all*
drivers must use if they don't implement their own methods. Then we
could take out the tests in the VFS for NULL methods. Any driver which
didn't fill in all the methods is liable to generate an OOPS.
Taking out the VFS tests would save a few cycles and more importantly
would make the VFS code more readable.

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html