Patch "bcachefs: bch2_kthread_io_clock_wait() no longer sleeps until full amount" has been added to the 6.7-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

    bcachefs: bch2_kthread_io_clock_wait() no longer sleeps until full amount

to the 6.7-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:
     bcachefs-bch2_kthread_io_clock_wait-no-longer-sleeps-until-full-amount.patch
and it can be found in the queue-6.7 subdirectory.

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


>From d92b83f592d810aded2e5f90db5f560cc8cf577b Mon Sep 17 00:00:00 2001
From: Kent Overstreet <kent.overstreet@xxxxxxxxx>
Date: Mon, 15 Jan 2024 14:15:26 -0500
Subject: bcachefs: bch2_kthread_io_clock_wait() no longer sleeps until full amount

From: Kent Overstreet <kent.overstreet@xxxxxxxxx>

commit d92b83f592d810aded2e5f90db5f560cc8cf577b upstream.

Drop t he loop in bch2_kthread_io_clock_wait(): this allows the code
that uses it to be woken up for other reasons, and fixes a bug where
rebalance wouldn't wake up when a scan was requested.

This raises the possibility of spurious wakeups, but callers should
always be able to handle that reasonably well.

Signed-off-by: Kent Overstreet <kent.overstreet@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/bcachefs/clock.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/bcachefs/clock.c
+++ b/fs/bcachefs/clock.c
@@ -109,7 +109,7 @@ void bch2_kthread_io_clock_wait(struct i
 	if (cpu_timeout != MAX_SCHEDULE_TIMEOUT)
 		mod_timer(&wait.cpu_timer, cpu_timeout + jiffies);
 
-	while (1) {
+	do {
 		set_current_state(TASK_INTERRUPTIBLE);
 		if (kthread && kthread_should_stop())
 			break;
@@ -119,7 +119,7 @@ void bch2_kthread_io_clock_wait(struct i
 
 		schedule();
 		try_to_freeze();
-	}
+	} while (0);
 
 	__set_current_state(TASK_RUNNING);
 	del_timer_sync(&wait.cpu_timer);


Patches currently in stable-queue which might be from kent.overstreet@xxxxxxxxx are

queue-6.7/bcachefs-don-t-pass-memcmp-as-a-pointer.patch
queue-6.7/bcachefs-kvfree-bch_fs-snapshots-in-bch2_fs_snapshots_exit.patch
queue-6.7/bcachefs-grab-s_umount-only-if-snapshotting.patch
queue-6.7/bcachefs-time_stats-check-for-last_event-0-when-updating-freq-stats.patch
queue-6.7/bcachefs-fix-incorrect-usage-of-req_op_flush.patch
queue-6.7/bcachefs-add-missing-bch2_moving_ctxt_flush_all.patch
queue-6.7/bcachefs-unlock-parent-dir-if-entry-is-not-found-in-subvolume-deletion.patch
queue-6.7/bcachefs-rebalance-should-wakeup-on-shutdown-if-disabled.patch
queue-6.7/bcachefs-bch2_kthread_io_clock_wait-no-longer-sleeps-until-full-amount.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