2012/8/22, Jan Kara <[email protected]>:
> On Wed 22-08-12 19:02:26, Namjae Jeon wrote:
>> 2012/8/21, Jan Kara <[email protected]>:
>> Hi. Jan.
>> Okay, We are trying to do it from your comment.
>> 1. Change udf_ext_cache structure to following which would also include
>> *bh.
>> struct udf_ext_cache {
>>
>> /* Position of the cached extent */
>> struct extent_position epos;
>>
>> /* Logical block where cached extent starts */
>> sector_t block;
>> };
>   OK.
>
>> 2. Remove call to brelse(epos.bh) from all the callers of inode_bmap()
>> and move it to udf_evict_inode()
>   It might be easier to keep brelse() where it is and add get_bh() to
> udf_add_extent_cache() and brelse() to udf_clear_extent_cache(). It is then
> easier to audit we don't leak bh references...
Good point. I will~
>
>> 3. As now we are not caching elen, etype and eloc, we have to change
>> the cache_hit logic in inode_bmap.
>> The call to function udf_next_aext is now necessary from inode_bmap.
>   Yes.
>
>> 4. Remove call to udf_clear_extent_cache() from udf_get_block as with
>> new scheme, it is not required.
>   You still need this when you write before the cached location (e.g. when
> the file has holes, and you write into them, extents will shift).
Okay, I see.
I will send v2 patch soon.
Thanks for your advice.
>
>
>                                                               Honza
> --
> Jan Kara <[email protected]>
> SUSE Labs, CR
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to