mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Matthew Wilcox <willy@debian.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	Marcelo Tosatti <marcelo@conectiva.com.br>,
	Chuck Lever <cel@netapp.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux FSdevel <linux-fsdevel@vger.kernel.org>,
	NFS maillist <nfs@lists.sourceforge.net>
Subject: Re: [PATCH] 2.4.20 Direct IO patch for NFS. (Note: a trivial API change...)
Date: Mon, 30 Sep 2002 20:57:58 +0200	[thread overview]
Message-ID: <15768.40630.512787.879557@charged.uio.no> (raw)
In-Reply-To: <20020930195235.P18377@parcelfarce.linux.theplanet.co.uk>

>>>>> " " == Matthew Wilcox <willy@debian.org> writes:

    >> -static int blkdev_direct_IO(int rw, struct inode * inode,
    >> struct kiobuf * iobuf, unsigned long blocknr, int blocksize)
    >> +static int blkdev_direct_IO(int rw, struct file * filp, struct
    >> kiobuf * iobuf, unsigned long blocknr, int blocksize) {
    >> + struct inode * inode =
    >>  	filp->f_dentry->d_inode->i_mapping->host;
    >> return generic_direct_IO(rw, inode, iobuf, blocknr, blocksize,
    >> blkdev_get_block); }
    >>

     > isn't that two dereferences more than necessary for a local
     > filesystem?

IIRC this is an issue with block filesystems: the i_mapping->host may
differ from d_inode.

It is in any case just the exact same dereference that is being made
in the current version of generic_file_direct_IO(). The API change
simply moves this dereference down into the filesystem code.

Cheers,
  Trond

      reply	other threads:[~2002-09-30 18:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-30 18:34 Trond Myklebust
2002-09-30 18:42 ` Christoph Hellwig
2002-09-30 18:46   ` Trond Myklebust
2002-09-30 19:04   ` Andrew Morton
2002-09-30 19:18   ` Alan Cox
2002-09-30 18:52 ` Matthew Wilcox
2002-09-30 18:57   ` Trond Myklebust [this message]

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=15768.40630.512787.879557@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=cel@netapp.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=nfs@lists.sourceforge.net \
    --cc=willy@debian.org \
    /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

all inboxes | Powered by JetHome®