lkml.org 
[lkml]   [2012]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH RESEND] udf: extent cache implementation for manipulating block map
From
2012/8/22, Jan Kara <jack@suse.cz>:
> On Wed 22-08-12 19:02:26, Namjae Jeon wrote:
>> 2012/8/21, Jan Kara <jack@suse.cz>:
>> 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 <jack@suse.cz>
> SUSE Labs, CR
>


\
 
 \ /
  Last update: 2012-08-22 13:01    [W:0.032 / U:1.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site