EVMS o(1) compatibility fixes & set_tast_state cleanups
2 things.
1 - to make evms work with o(1) scheduler. replace ->nice assigmnemnts with set_user_nice
2 - ->state assignments with set_{task,current}_state.
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.231 -> 1.232
# drivers/evms/md_core.c 1.1 -> 1.2
# drivers/evms/ldev_mgr.c 1.1 -> 1.2
# drivers/evms/evms.c 1.1 -> 1.2
# drivers/evms/md_raid5.c 1.1 -> 1.2
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/05 [email protected] 1.232
# o(1) adoption
# --------------------------------------------
#
drivers/evms/evms.c +3 -3
@@ -1301,7 +1301,7 @@ thread->tsk = current; current->policy =SCHED_OTHER ; - current->nice =-20 ; +set_user_nice (current,-20 );unlock_kernel ();complete (thread->event);
@@ -1310,11 +1310,11 @@DECLARE_WAITQUEUE (wait, current);add_wait_queue (&thread->wqueue, &wait); -set_task_state (current,TASK_INTERRUPTIBLE ); +set_current_state (TASK_INTERRUPTIBLE );if (!test_bit (EVMS_THREAD_WAKEUP , &thread->flags)) {schedule (); } - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&thread->wqueue, &wait);clear_bit (EVMS_THREAD_WAKEUP , &thread->flags);
drivers/evms/ldev_mgr.c +1 -1
@@ -796,7 +796,7 @@break ;schedule (); }while (atomic_read (&bh_cb->blks_allocated)); - tsk->state =TASK_RUNNING ; +set_task_state (tsk,TASK_RUNNING );remove_wait_queue (&bh_cb->cb_wait, &wait); }
drivers/evms/md_core.c +4 -4
@@ -2677,7 +2677,7 @@/* * Resync has low priority. */ - current->nice =19 ; +set_user_nice (current,19 );is_mddev_idle (mddev);/* this also initializes IO event counters */ for (m =0 ; m <SYNC_MARKS ; m++) {
@@ -2756,16 +2756,16 @@ currspeed = (j-mddev->resync_mark_cnt)/2 /((jiffies-mddev->resync_mark)/HZ +1 ) +1 ;if (currspeed > sysctl_speed_limit_min) { - current->nice =19 ; +set_user_nice (current,19 );if ((currspeed > sysctl_speed_limit_max) || !is_mddev_idle (mddev)) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );md_schedule_timeout (HZ /4 ); goto repeat; } }else - current->nice =-20 ; +set_user_nice (current,-20 ); }LOG_DEFAULT ("md%d: sync done.\n" ,mdidx (mddev)); err =0 ;
drivers/evms/md_raid5.c +1 -1
@@ -1262,7 +1262,7 @@break ;schedule (); }while (atomic_read (&bh_cb->blks_allocated)); - tsk->state =TASK_RUNNING ; +set_task_state (tsk,TASK_RUNNING );remove_wait_queue (&bh_cb->cb_wait, &wait); }
Signature · 2 lines
Paul P 'Stingray' Komkoff 'Greatest' Jr // (icq)23200764 // (irc)Spacebar PPKJ1-RIPE // (smtp)[email protected] // (http)stingr.net // (pgp)0xA4B4ECA4