lkml.org 
[lkml]   [2007]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateWed, 14 Mar 2007 12:28:01 -0700
From"Michael K. Edwards" <>
Subjectf_mapping->host vs. f_path.dentry->d_inode
It appears that there are (at least) two ways to get the inode (if
any) associated with an open file: f_mapping->host (pagecache?) and
f_path.dentry->d_inode (dentry cache?). generic_file_llseek uses
f_mapping->host; everything else in read_write.c uses
f_path.dentry->d_inode. do_sendfile checks for a null inode on its
input fd but not on its output fd; nothing else in read_write.c checks
for null inode.

Under what circumstances can f_mapping->host and f_path.dentry->d_inode differ?

Under what circumstances can either or both of these pointers be null?

Under what circumstances is it preferable to retrieve the inode from
f_mapping vs. f_path.dentry, either because they differ or because one
or the other is more likely to be warm in cache?

Cheers,
- Michael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-14 20:31    [from the cache]
©2003-2010