From: Jeff Garzik <jgarzik@pobox.com>
To: trond.myklebust@fys.uio.no
Cc: Marc-Christian Petersen <m.c.p@wolk-project.de>,
Marcelo Tosatti <marcelo@conectiva.com.br>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: ->direct_IO API change in current 2.4 BK
Date: Wed, 09 Jul 2003 17:43:33 -0400 [thread overview]
Message-ID: <3F0C8C85.6090604@pobox.com> (raw)
In-Reply-To: <16140.29271.365874.304823@charged.uio.no>
Trond Myklebust wrote:
>>>>>>" " == Jeff Garzik <jgarzik@pobox.com> writes:
>
>
> > Having the stable API change, conditional on a define, is
> > really nasty and IMO will create maintenance and support
> > headaches down the line. I do not recall Linux VFS _ever_
> > having a hook's definition conditional. We should not start
> > now...
>
> direct_IO() was precisely such a conditional hook definition. It
> appeared in 2.4.15, and anybody who does not check for
> KERNEL_HAS_O_DIRECT is not backward compatible.
You misunderstand. The 2.4.15 direct_IO hook was _not_ conditionally
defined. It appeared in the middle of a stable series, yes. It has a
feature macro, yes. But the definition of the hook in
include/linux/fs.h does not _change_ based on a define. That is what I
mean by a conditional hook definition.
It is far less trouble for everyone to add a new hook, instead of
changing an existing hook, in the middle of a stable series.
> To comment further: There is at least one example I can think of which
> was exactly equivalent to the proposed change, namely the redefinition
> of the filldir_t type in 2.4.9. It was admittedly not documented using
> a define...
No doubt you can find more :) That doesn't make the right thing to do,
though :)
> Note: We could at the same time replace the name direct_IO() with
> direct_IO2() (that has several precedents). There are currently only
> a small number of filesystems that provide O_DIRECT, and converting
> them all is (as has been pointed out before) trivial...
We cannot just-fix-up filesystems which are not in-tree, which is what
the KERNEL_HAS_O_DIRECT2 define would be mainly used for. In-tree
filesystems would just unconditionally use the new, or old, interface as
they chose.
> The problem with read_inode2() was rather that it overloaded the the
> existing iget4() interface...
The higher-level problem was that we didn't want to change the VFS
API... otherwise we could have simply used the new interface, and
converted all in-tree filesystems.
Jeff
next prev parent reply other threads:[~2003-07-09 21:29 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-09 12:31 ->direct_IO API change in current 2.4 BK Christoph Hellwig
2003-07-09 17:03 ` Andreas Dilger
2003-07-09 17:24 ` Marcelo Tosatti
2003-07-09 17:43 ` Marc-Christian Petersen
2003-07-09 17:46 ` Marcelo Tosatti
2003-07-09 17:55 ` Marc-Christian Petersen
2003-07-09 18:08 ` Marcelo Tosatti
2003-07-09 18:22 ` Marc-Christian Petersen
2003-07-09 19:13 ` Marcelo Tosatti
2003-07-09 19:45 ` Marc-Christian Petersen
2003-07-09 23:43 ` Alan Cox
2003-07-10 0:21 ` Jeff Garzik
2003-07-09 18:33 ` Trond Myklebust
2003-07-09 18:41 ` Marc-Christian Petersen
2003-07-09 18:50 ` Trond Myklebust
2003-07-09 18:55 ` Marc-Christian Petersen
2003-07-09 19:05 ` Jeff Garzik
2003-07-09 19:08 ` Trond Myklebust
2003-07-09 19:17 ` Jeff Garzik
2003-07-09 19:51 ` Trond Myklebust
2003-07-09 21:43 ` Jeff Garzik [this message]
2003-07-09 23:42 ` Alan Cox
2003-07-10 0:23 ` Jeff Garzik
2003-07-09 23:40 ` Alan Cox
2003-07-09 18:29 ` Trond Myklebust
2003-07-09 18:51 ` Andreas Dilger
2003-07-09 19:18 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F0C8C85.6090604@pobox.com \
--to=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.c.p@wolk-project.de \
--cc=marcelo@conectiva.com.br \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox