linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] f2fs: fix extent cache memory leak
@ 2015-03-06  7:00 Wanpeng Li
  2015-03-06  7:00 ` [PATCH 2/2] f2fs: reduce searching region of segmap when set free section Wanpeng Li
  2015-03-09  2:30 ` [PATCH 1/2] f2fs: fix extent cache memory leak Chao Yu
  0 siblings, 2 replies; 3+ messages in thread
From: Wanpeng Li @ 2015-03-06  7:00 UTC (permalink / raw)
  To: Jaegeuk Kim
  Cc: Changman Lee, Chao Yu, linux-f2fs-devel, linux-fsdevel,
	linux-kernel, Wanpeng Li

extent tree/node slab cache is created during f2fs insmod,
how, it isn't destroyed during f2fs rmmod, this patch fix 
it by destroy extent tree/node slab cache once rmmod f2fs.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
---
 fs/f2fs/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index e649f21..0b8a2d8 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1323,6 +1323,7 @@ static void __exit exit_f2fs_fs(void)
 	remove_proc_entry("fs/f2fs", NULL);
 	f2fs_destroy_root_stats();
 	unregister_filesystem(&f2fs_fs_type);
+	destroy_extent_cache();
 	destroy_checkpoint_caches();
 	destroy_segment_manager_caches();
 	destroy_node_manager_caches();
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] f2fs: reduce searching region of segmap when set free section
  2015-03-06  7:00 [PATCH 1/2] f2fs: fix extent cache memory leak Wanpeng Li
@ 2015-03-06  7:00 ` Wanpeng Li
  2015-03-09  2:30 ` [PATCH 1/2] f2fs: fix extent cache memory leak Chao Yu
  1 sibling, 0 replies; 3+ messages in thread
From: Wanpeng Li @ 2015-03-06  7:00 UTC (permalink / raw)
  To: Jaegeuk Kim
  Cc: Changman Lee, Chao Yu, linux-f2fs-devel, linux-fsdevel,
	linux-kernel, Wanpeng Li

In __set_free we will check whether all segment are free in one section 
when free one segment, in order to set section to free status. But the 
searching region of segmap is from start segno to last segno of main 
area, it's not necessary. So let's just only check all segment bitmap 
of target section.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
---
 fs/f2fs/segment.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 7fd3511..85d7fa7 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -336,7 +336,8 @@ static inline void __set_free(struct f2fs_sb_info *sbi, unsigned int segno)
 	clear_bit(segno, free_i->free_segmap);
 	free_i->free_segments++;
 
-	next = find_next_bit(free_i->free_segmap, MAIN_SEGS(sbi), start_segno);
+	next = find_next_bit(free_i->free_segmap,
+			start_segno + sbi->segs_per_sec, start_segno);
 	if (next >= start_segno + sbi->segs_per_sec) {
 		clear_bit(secno, free_i->free_secmap);
 		free_i->free_sections++;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH 1/2] f2fs: fix extent cache memory leak
  2015-03-06  7:00 [PATCH 1/2] f2fs: fix extent cache memory leak Wanpeng Li
  2015-03-06  7:00 ` [PATCH 2/2] f2fs: reduce searching region of segmap when set free section Wanpeng Li
@ 2015-03-09  2:30 ` Chao Yu
  1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2015-03-09  2:30 UTC (permalink / raw)
  To: 'Wanpeng Li', 'Jaegeuk Kim'
  Cc: 'Changman Lee', linux-f2fs-devel, linux-fsdevel,
	linux-kernel

Hi Wanpeng,

> -----Original Message-----
> From: Wanpeng Li [mailto:wanpeng.li@linux.intel.com]
> Sent: Friday, March 06, 2015 3:01 PM
> To: Jaegeuk Kim
> Cc: Changman Lee; Chao Yu; linux-f2fs-devel@lists.sourceforge.net;
> linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; Wanpeng Li
> Subject: [PATCH 1/2] f2fs: fix extent cache memory leak
> 
> extent tree/node slab cache is created during f2fs insmod,
> how, it isn't destroyed during f2fs rmmod, this patch fix
> it by destroy extent tree/node slab cache once rmmod f2fs.

This is my bad, thanks for your catching and fixing.

> 
> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>

Reviewed-by: Chao Yu <chao2.yu@samsung.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-09  2:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-06  7:00 [PATCH 1/2] f2fs: fix extent cache memory leak Wanpeng Li
2015-03-06  7:00 ` [PATCH 2/2] f2fs: reduce searching region of segmap when set free section Wanpeng Li
2015-03-09  2:30 ` [PATCH 1/2] f2fs: fix extent cache memory leak Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).