Thread (2 messages) 2 messages, 2 authors, 2002-09-30

Re: [PATCH] 2.4.20 Direct IO patch for NFS. (Note: a trivial API change...)

From: Trond Myklebust <hidden>
Date: 2002-09-30 18:57:58
Also in: linux-fsdevel, lkml

Possibly related (same subject, not in this thread)

quoted
quoted
quoted
quoted
" " == Matthew Wilcox [off-list ref] 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


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help