[lkml]   [2001]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Q] [VFS] i_mapping vs. i_data ?

On Tue, 22 May 2001, Jean-Marc Saffroy wrote:

> Hello,
> I have the following question for VFS gurus here:
> In the inode struct, an address_space (i_data) and a pointer to an
> address_space (i_mapping) are defined, and it looks like i_mapping is
> always a reference to the inode's i_data (except in coda_open). Then what
> is the difference of meaning between these two ?

i_data is "pages read/written by this inode"
i_mapping is "whom should I ask for pages?"

IOW, everything outside of individual filesystems should use the latter.
They are same if (and only if) inode owns the data. CODA (or anything that
caches data on a local fs) will have i_mapping pointing to the i_data of
inode it caches into. Ditto for block devices if/when they go into pagecache -
we should associate pagecache with struct block_device, since we can have
many inodes with the same major:minor. IOW, ->i_mapping should be pointing
to the same place for all of them.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:53    [W:0.049 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site