Skip to content

Commit

Permalink
f2fs: kill f2fs_drop_largest_extent
Browse files Browse the repository at this point in the history
For direct IO, f2fs only allocate new address for the block which is not
exist in the disk before, its mapping info should not exist in extent
cache previously, so here we do not need to call f2fs_drop_largest_extent
to drop related cache.

Due to no more callers for f2fs_drop_largest_extent now, kill it.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Chao Yu authored and Jaegeuk Kim committed Dec 4, 2015
1 parent b7973f2 commit 9006f2c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions fs/f2fs/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,6 @@ static int __allocate_data_block(struct dnode_of_data *dn)
if (i_size_read(dn->inode) < ((loff_t)(fofs + 1) << PAGE_CACHE_SHIFT))
i_size_write(dn->inode,
((loff_t)(fofs + 1) << PAGE_CACHE_SHIFT));

/* direct IO doesn't use extent cache to maximize the performance */
f2fs_drop_largest_extent(dn->inode, fofs);

return 0;
}

Expand Down
8 changes: 0 additions & 8 deletions fs/f2fs/extent_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,6 @@ static void __drop_largest_extent(struct inode *inode,
largest->len = 0;
}

void f2fs_drop_largest_extent(struct inode *inode, pgoff_t fofs)
{
if (!f2fs_may_extent_tree(inode))
return;

__drop_largest_extent(inode, fofs, 1);
}

void f2fs_init_extent_tree(struct inode *inode, struct f2fs_extent *i_ext)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
Expand Down
1 change: 0 additions & 1 deletion fs/f2fs/f2fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,6 @@ void f2fs_leave_shrinker(struct f2fs_sb_info *);
* extent_cache.c
*/
unsigned int f2fs_shrink_extent_tree(struct f2fs_sb_info *, int);
void f2fs_drop_largest_extent(struct inode *, pgoff_t);
void f2fs_init_extent_tree(struct inode *, struct f2fs_extent *);
unsigned int f2fs_destroy_extent_node(struct inode *);
void f2fs_destroy_extent_tree(struct inode *);
Expand Down

0 comments on commit 9006f2c

Please sign in to comment.