public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Trond Myklebust <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, 9 Jul 2003 15:17:39 -0400	[thread overview]
Message-ID: <20030709191739.GH15293@gtf.org> (raw)
In-Reply-To: <16140.26693.72927.451259@charged.uio.no>

On Wed, Jul 09, 2003 at 09:08:53PM +0200, Trond Myklebust wrote:
> >>>>> " " == Jeff Garzik <jgarzik@pobox.com> writes:
> 
>      > s/replacing/adding/
> 
> Revert ;-)
> 
>      > A new ->direct_IO2 hook would be an addition, so you really
>      > want to simply add another feature flag.
> 
> You missed the point. This is *instead* of ->direct_IO2. It's only
> purpose would be to distinguish between the old
> 
>  int (*direct_IO)(int, struct inode *, struct kiobuf *, unsigned long, int);
> 
> 
> and the new
> 
>  int (*direct_IO)(int, struct file *, struct kiobuf *, unsigned long, int);

I respectfully disagree, then.

The 2.5 direct_IO API is already different from 2.4, so, changing
the 2.4 stable API implies creating yet another different version of
the API.

When this situation presented itself earlier, with reiserfs, the
solution was ->read_inode2.  I think that same situation applies here.

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...

We need a 2.4-specific solution for this.  ->direct_IO2 should suffice,
and it follows historical example.

XFS, ocfs, and others need only to test the HAVE_NEW_24_DIRECT_IO
define.

In the core kernel implementation, it is trivial to say "if direct_IO2
is non-NULL, use that, otherwise use direct_IO", without needing to make
any code conditional at all.

	Jeff




  reply	other threads:[~2003-07-09 19:03 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 [this message]
2003-07-09 19:51                         ` Trond Myklebust
2003-07-09 21:43                           ` Jeff Garzik
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=20030709191739.GH15293@gtf.org \
    --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