Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754282AbbLADsS (ORCPT ); Mon, 30 Nov 2015 22:48:18 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:50879 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752190AbbLADsR (ORCPT ); Mon, 30 Nov 2015 22:48:17 -0500 X-AuditID: cbfee61b-f793c6d00000236c-71-565d187ed694 From: Chao Yu To: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] f2fs: kill f2fs_drop_largest_extent Date: Tue, 01 Dec 2015 11:47:33 +0800 Message-id: <000001d12beb$1b572560$52057020$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AdEr6qahiAbGAP31RzOC3akmOZgiGw== Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJLMWRmVeSWpSXmKPExsVy+t9jQd06idgwg2WX9C2erJ/FbHFpkbvF 5V1z2ByYPTat6mTz2L3gM5PH501yAcxRXDYpqTmZZalF+nYJXBm7v/SyFPznr5i+/R9jA+Ns 3i5GDg4JAROJi/e8uhg5gUwxiQv31rOB2EICsxgl2g7KdjFyAdmvGCXO/dvCDJJgE1CRWN7x nwnEFgGyDy26zA5iMwt4SDR2fGcFmSkMNPP4QbByFgFViZ1vZoHN5BWwlPj77hY7hC0o8WPy PRaIVi2J9TuPM0HY8hKb17xlhrhHQWLH2deMEKv0JF7+vcQGUSMusfHILZYJjEBHIoyahWTU LCSjZiFpWcDIsopRIrUguaA4KT3XKC+1XK84Mbe4NC9dLzk/dxMjOICfSe9gPLzL/RCjAAej Eg/vgVUxYUKsiWXFlbmHGCU4mJVEeFf/BgrxpiRWVqUW5ccXleakFh9ilOZgURLn3XcpMkxI ID2xJDU7NbUgtQgmy8TBKdXAuFKvYTe7hcbC+Dd+sdq5qrGOXxlSF7ROWuDsUbix7KQPn2Yv 36ZCiYiXbxfYPJ136tThv4vXve1+lc91pq5J5G7CWktr58evLZbVXvuwxfnX7cze2Vuv+Wlw JKmlnsn/lxksrJKglXx15nfjY2qsvEyv605YHwr8pJO/SsyLVVZkzplpd5QWKLEUZyQaajEX FScCAFDdg+NcAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2228 Lines: 69 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 --- fs/f2fs/data.c | 4 ---- fs/f2fs/extent_cache.c | 8 -------- fs/f2fs/f2fs.h | 1 - 3 files changed, 13 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 5fc042f..e303212 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -492,10 +492,6 @@ alloc: 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; } diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index 7ddba81..6cc9b88 100644 --- a/fs/f2fs/extent_cache.c +++ b/fs/f2fs/extent_cache.c @@ -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); diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index fdb8ab8..95c4782 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -2071,7 +2071,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 *); -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/