reiser4: port for Linux-5.10
Subsystems (3)
PATCH 1/1 reiser4: port for Linux-5.10
Don't add/use PF_FLUSHER per task flag.
Instead add/use per reiser4_context flag flush_bd_task to indicate that it is bd flushing task.
fs/fs-writeback.c +1 -1
@@ -2090,7 +2090,7 @@long pages_written;set_worker_desc ("flush-%s" ,bdi_dev_name (wb->bdi)); - current->flags |=PF_FLUSHER |PF_SWAPWRITE ; + current->flags |=PF_SWAPWRITE ;if (likely (!current_is_workqueue_rescuer () || !test_bit (WB_registered, &wb->state))) {
fs/reiser4/context.c +1 -1
@@ -153,7 +153,7 @@if (sbinfo !=NULL && sbinfo->fake !=NULL && context->nr_marked_dirty !=0 && !(current->flags &PF_MEMALLOC ) && - !current_is_flush_bd_task ()) + !context->flush_bd_task)reiser4_throttle_write (sbinfo->fake); }
fs/reiser4/context.h +2 -0
@@ -64,6 +64,8 @@ unsigned int on_stack:1;/* file system is read-only */ unsigned int ro:1; +/* replacement of PF_FLUSHER */ + unsigned int flush_bd_task:1;/* count non-trivial jnode_set_dirty() calls */ unsigned long nr_marked_dirty;
fs/reiser4/super_ops.c +1 -0
@@ -383,6 +383,7 @@spin_lock (&wb->list_lock); goto skip; } + ctx->flush_bd_task =1 ;/* * call reiser4_writepages for each of dirty inodes to turn * dirty pages into transactions if they were not yet.
fs/reiser4/txnmgr.c +1 -1
@@ -1413,7 +1413,7 @@* Write throttling is case of no one atom can be * flushed/committed. */ -if (!current_is_flush_bd_task ()) { +if (!ctx->flush_bd_task) {list_for_each_entry (atom, &tmgr->atoms_list, atom_link) {spin_lock_atom (atom);/* Repeat the check from the above. */
include/linux/sched.h +0 -1
@@ -1483,7 +1483,6 @@/* * Per process flags */ -#define PF_FLUSHER 0x00000001/* responsible for disk writeback */ #define PF_IDLE 0x00000002/* I am an IDLE thread */ #define PF_EXITING 0x00000004/* Getting shut down */ #define PF_VCPU 0x00000010/* I'm a virtual CPU */
include/linux/writeback.h +0 -6
@@ -17,12 +17,6 @@DECLARE_PER_CPU (int, dirty_throttle_leaks); -static inline int is_flush_bd_task (struct task_struct *task) -{ -return task->flags &PF_FLUSHER ; -} -#define current_is_flush_bd_task () is_flush_bd_task(current) -/* * The 1/4 region under the global dirty thresh is for smooth dirty throttling: *