Patch "f2fs: fix wrong condition to trigger background checkpoint correctly" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    f2fs: fix wrong condition to trigger background checkpoint correctly

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     f2fs-fix-wrong-condition-to-trigger-background-checkpoint-correctly.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From cd6d697a6e2013a0a85f8b261b16c8cfd50c1f5f Mon Sep 17 00:00:00 2001
From: Chao Yu <chao@xxxxxxxxxx>
Date: Wed, 29 Sep 2021 03:19:14 +0800
Subject: f2fs: fix wrong condition to trigger background checkpoint correctly

From: Chao Yu <chao@xxxxxxxxxx>

commit cd6d697a6e2013a0a85f8b261b16c8cfd50c1f5f upstream.

In f2fs_balance_fs_bg(), it needs to check both NAT_ENTRIES and INO_ENTRIES
memory usage to decide whether we should skip background checkpoint, otherwise
we may always skip checking INO_ENTRIES memory usage, so that INO_ENTRIES may
potentially cause high memory footprint.

Fixes: 493720a48543 ("f2fs: fix to avoid REQ_TIME and CP_TIME collision")
Signed-off-by: Chao Yu <chao@xxxxxxxxxx>
Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/f2fs/segment.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -550,7 +550,7 @@ void f2fs_balance_fs_bg(struct f2fs_sb_i
 		goto do_sync;
 
 	/* checkpoint is the only way to shrink partial cached entries */
-	if (f2fs_available_free_memory(sbi, NAT_ENTRIES) ||
+	if (f2fs_available_free_memory(sbi, NAT_ENTRIES) &&
 		f2fs_available_free_memory(sbi, INO_ENTRIES))
 		return;
 


Patches currently in stable-queue which might be from chao@xxxxxxxxxx are

queue-5.10/f2fs-increase-the-limit-for-reserve_root.patch
queue-5.10/f2fs-fix-race-condition-on-setting-fi_no_extent-flag.patch
queue-5.10/f2fs-fix-wrong-condition-to-trigger-background-checkpoint-correctly.patch
queue-5.10/f2fs-fix-to-do-sanity-check-on-summary-info.patch
queue-5.10/f2fs-fix-to-do-sanity-check-on-destination-blkaddr-during-recovery.patch
queue-5.10/f2fs-fix-to-account-fs_cp_data_io-correctly.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux