On 2017/2/26 3:39, Jaegeuk Kim wrote: > On 02/25, heyunlei wrote: >> Hi all, >> >> I am really confused by the condition below use sec_freed, is it always >> equal to zero? > > Seems it is always zero. Let's fix it together. > > Pengyang, > > I merged your patches and finally got this. > How do you think? > >>From d1c2206e4f245a8fedec3a8f21ad522b3b1b2d0c Mon Sep 17 00:00:00 2001 > From: Hou Pengyang <houpengy...@huawei.com> > Date: Sat, 25 Feb 2017 03:57:38 +0000 > Subject: [PATCH] f2fs: avoid bggc->fggc when enough free segments are > avaliable after cp > > We use has_not_enough_free_secs to check if there are enough free segments, > > (free_sections(sbi) + freed) <= > (node_secs + 2 * dent_secs + imeta_secs + > reserved_sections(sbi) + needed); > > Under scenario with large number of dirty nodes, these nodes would be flushed > during cp, as a result, right side of the inequality would be decreased, while > left side stays unchanged if these nodes are flushed in SSR way, which means > there are enough free segments after this cp. > > For this case, we just do a bggc instead of fggc. > > Signed-off-by: Hou Pengyang <houpengy...@huawei.com> > Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org>
Reviewed-by: Chao Yu <yuch...@huawei.com> Thanks, ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel