[PATCH] Bugfix for nilfs-utils-2.2.7 reduce_ncleansegs_for_retry()

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

 



I think I've found a bug in nilfs-utils 2.2.7 when the number of segments
to clean per pass is halfed in respons to a memory shortage. if
cleanerd->running == 2 it is a manual run, and thus it should be
mm_ncleansegs that is reduced.

/Tommy




--- sbin/cleanerd/cleanerd.c.orig	2017-11-05 14:37:35.000000000 +0100
+++ sbin/cleanerd/cleanerd.c	2018-11-30 14:37:07.796848869 +0100
@@ -485,11 +485,11 @@
 nilfs_cleanerd_reduce_ncleansegs_for_retry(struct nilfs_cleanerd *cleanerd)
 {
 	if (cleanerd->running == 2) {
-		if (cleanerd->ncleansegs > 1)
-			cleanerd->ncleansegs >>= 1;
-	} else  {
 		if (cleanerd->mm_ncleansegs > 1)
 			cleanerd->mm_ncleansegs >>= 1;
+	} else  {
+		if (cleanerd->ncleansegs > 1)
+			cleanerd->ncleansegs >>= 1;
 	}
 }
 



[Index of Archives]     [Linux Filesystem Development]     [Linux BTRFS]     [Linux CIFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux