Messages in this thread | | | Date | Wed, 22 Aug 2012 19:27:40 +0900 | Subject | Re: [PATCH RESEND] udf: extent cache implementation for manipulating block map | From | Namjae Jeon <> |
| |
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 >
| |