Kathy KN (HK) wrote:
>>Hi Kathy -
>>
>>If performance is more important or you really do only have access to an
>>inode, you can read from the page cache directly using inode->i_mapping
>>and read_cache_page. This has the advantage that you don't need to copy
>>the data to access it, but the disadvantage that it is more complex and
>>can be tricky to get right.
> 
> Hi Jeff,
> 
> I felt that the second suggestion seems to be more of an elegant
> solution, though I need to find out how to actually do it correctly.
> 
> Thanks for the tip. If you have example code, that would be splendid.

It's not the prettiest, and in fact I'm in the process of reworking it,
but code similar to what you're looking at implementing can be found in
fs/reiserfs/xattr.c; Start your analysis at reiserfs_xattr_get().

-Jeff

-- 
Jeff Mahoney
SuSE Labs
-
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

Reply via email to