Re: libata and pm

From: Jeff Garzik
Date: Sun Nov 30 2003 - 11:03:18 EST


Prakash K. Cheemplavam wrote:
Hi,

I wonder whether libata can easily be made compatible with swsup or pmdisk.

Currently my tries stop with the message:

PM: Preparing system for suspend
Stopping tasks: =================================================exiting...========
stopping tasks failed (1 tasks remaining)
Restarting tasks...<6> Strange, katad-1 not stopped
done


I think that katad belongs to libata.

I'm curious if this [completely untested] patch works? :)

Jeff


===== drivers/scsi/libata-core.c 1.7 vs edited =====
--- 1.7/drivers/scsi/libata-core.c Mon Nov 24 11:19:30 2003
+++ edited/drivers/scsi/libata-core.c Sun Nov 30 11:01:26 2003
@@ -2567,6 +2567,9 @@

timeout = ata_thread_iter(ap);

+ if (current->flags & PF_FREEZE)
+ refrigerator(PF_IOTHREAD);
+
if (signal_pending (current))
flush_signals(current);