Skip to contentSkip to conversation

Make md thread NO_FREEZE.

PATCH In review Nigel Cunningham 2 participants 2 messages Mar 15, 2005 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make md thread NO_FREEZE.

Hi again.

The md driver is currently frozen during suspend. I'm told this doesn't help much if you're seeking to suspend to RAID :>

drivers/md/md.c +1 -3
diff -ruNp 213-missing-refrigerator-calls-old/drivers/md/md.c 213-missing-refrigerator-calls-new/drivers/md/md.c
@@ -36,7 +36,6 @@
 #include <linux/sysctl.h>
 #include <linux/devfs_fs_kernel.h>
 #include <linux/buffer_head.h> /* for invalidate_bdev */
-#include <linux/suspend.h>
 
 #include <linux/init.h>
 
@@ -2763,6 +2762,7 @@ int md_thread(void * arg)
 	 */
 
 	daemonize(thread->name, mdname(thread->mddev));
+	current->flags |= PF_NOFREEZE;
 
 	current->exit_signal = SIGCHLD;
 	allow_signal(SIGKILL);
@@ -2787,8 +2787,6 @@ int md_thread(void * arg)
 
 		wait_event_interruptible(thread->wqueue,
 					 test_bit(THREAD_WAKEUP, &thread->flags));
-		if (current->flags & PF_FREEZE)
-			refrigerator(PF_FREEZE);
 
 		clear_bit(THREAD_WAKEUP, &thread->flags);
 
Signature · 6 lines
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com
Bus: +61 (2) 6291 9554; Hme: +61 (2) 6292 8028;  Mob: +61 (417) 100 574

Maintainer of Suspend2 Kernel Patches http://suspend2.net
#1 lore raw

Hi!

Quoted 2 lines

The md driver is currently frozen during suspend. I'm told this doesn't help much if you're seeking to suspend to RAID :>

Hmm, and does suspend actually work on md with this patch applied?

Pavel

Quoted 22 lines

diff -ruNp 213-missing-refrigerator-calls-old/drivers/md/md.c 213-missing-refrigerator-calls-new/drivers/md/md.c

drivers/md/md.c +1 -2
@@ -2763,6 +2762,7 @@ int md_thread(void * arg)
 	 */
 
 	daemonize(thread->name, mdname(thread->mddev));
+	current->flags |= PF_NOFREEZE;
 
 	current->exit_signal = SIGCHLD;
 	allow_signal(SIGKILL);
@@ -2787,8 +2787,6 @@ int md_thread(void * arg)
 
 		wait_event_interruptible(thread->wqueue,
 					 test_bit(THREAD_WAKEUP, &thread->flags));
-		if (current->flags & PF_FREEZE)
-			refrigerator(PF_FREEZE);
 
 		clear_bit(THREAD_WAKEUP, &thread->flags);
 
Signature · 2 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!