Don't worry too much about that, that relationship has been false for
Coda ever since i_mapping was introduced.
The only problem that is still lingering is related to i_size. Writes
update inode->i_mapping->host->i_size, and stat reads inode->i_size,
which are not the same.
I sent a small patch to stat.c for this a long time ago (Linux
2.3.99-pre6-7), which made the assumption in stat that i_mapping->host
was an inode. (effectively tmp.st_size = inode->i_mapping->host->i_size)
Other solutions were to finish the getattr implementation, or keep a
small Coda-specific wrapper for generic_file_write around.
> >> > One actually shouldn't assume that mapping->host is an inode.
> >>
> >> What else could it be, since it's a "struct inode *"? NULL?
> >
> >struct block_device *, for one thing. We'll have to do that as soon
> >as we do block devices in pagecache.
>
> No, Al. It's an inode. It was a major mistake to ever think anything
> else.
So is anyone interested in a small patch for stat.c? It fixes, as far as
I know, the last place that 'assumes' that inode->i_mapping->host is
identical to &inode.
Jan
-
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/