>What I meant by >> via blocks is to gain knowledge of the physical blocks used by the inodes >> and retrieve the content from it directly, by accessing b_data. > >The problem with that approach is that some filesystems may store part >of the file outside of a complete block.
There's an even more basic problem with this approach: The question is specifically about the filesystem-type-independent layer above the VFS interface. At this layer, you don't even know that there is a block device involved. And if you do, you don't know that the filesystem driver uses the buffer cache to access it. And if you do know that it uses the buffer cache, you don't know that the file data you're looking for is presently in the buffer cache, or how to get it there if it isn't. If you believe in the layering at all, the only interface you can consider at this layer for getting at file data is VFS ->read. -- Bryan Henderson San Jose California IBM Almaden Research Center Filesystems - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
