All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] GFS2 - bz 192082: System won't suspend with GFS2 file system mounted
@ 2007-06-27 15:40 Abhijith Das
  2007-06-27 15:50 ` Abhijith Das
  0 siblings, 1 reply; 5+ messages in thread
From: Abhijith Das @ 2007-06-27 15:40 UTC (permalink / raw)
  To: cluster-devel.redhat.com

The kernel threads in gfs2, namely gfs2_scand, gfs2_logd,
gfs2_quotad, gfs2_glockd, gfs2_recoverd weren't doing anything when the suspend
mechanism was trying to freeze them.

I put in calls to refrigerator() in the loops for all the daemons and suspend works as expected.

Signed-off-by: Abhijith Das <adas@redhat.com>
--

diff --git a/fs/gfs2/daemon.c b/fs/gfs2/daemon.c
index 683cb5b..675c8e6 100644
--- a/fs/gfs2/daemon.c
+++ b/fs/gfs2/daemon.c
@@ -16,6 +16,7 @@ #include <linux/kthread.h>
 #include <linux/delay.h>
 #include <linux/gfs2_ondisk.h>
 #include <linux/lm_interface.h>
+#include <linux/freezer.h>

 #include "gfs2.h"
 #include "incore.h"
@@ -27,6 +28,10 @@ #include "recovery.h"
 #include "super.h"
 #include "util.h"

+/* When one of our daemons (kernel threads) receives a signal
+   from the kernel's suspend mechanism to freeze, we oblige */
+#define freeze_on_signal { if (freezing(current)) refrigerator(); }
+
 /* This uses schedule_timeout() instead of msleep() because it's good for
    the daemons to wake up more often than the timeout when unmounting so
    the user's unmount doesn't sit there forever.
@@ -49,6 +54,7 @@ int gfs2_scand(void *data)
        while (!kthread_should_stop()) {
                gfs2_scand_internal(sdp);
                t = gfs2_tune_get(sdp, gt_scand_secs) * HZ;
+               freeze_on_signal;
                schedule_timeout_interruptible(t);
        }

@@ -74,6 +80,7 @@ int gfs2_glockd(void *data)
                wait_event_interruptible(sdp->sd_reclaim_wq,
                                         (atomic_read(&sdp->sd_reclaim_count) ||
                                         kthread_should_stop()));
+               freeze_on_signal;
        }

        return 0;
@@ -93,6 +100,7 @@ int gfs2_recoverd(void *data)
        while (!kthread_should_stop()) {
                gfs2_check_journals(sdp);
                t = gfs2_tune_get(sdp,  gt_recoverd_secs) * HZ;
+               freeze_on_signal;
                schedule_timeout_interruptible(t);
        }

@@ -141,6 +149,7 @@ int gfs2_logd(void *data)
                }

                t = gfs2_tune_get(sdp, gt_logd_secs) * HZ;
+               freeze_on_signal;
                schedule_timeout_interruptible(t);
        }

@@ -191,6 +200,7 @@ int gfs2_quotad(void *data)
                gfs2_quota_scan(sdp);

                t = gfs2_tune_get(sdp, gt_quotad_secs) * HZ;
+               freeze_on_signal;
                schedule_timeout_interruptible(t);
        }





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH] GFS2 - bz 192082: System won't suspend with GFS2 file system mounted
  2007-06-27 15:40 [Cluster-devel] [PATCH] GFS2 - bz 192082: System won't suspend with GFS2 file system mounted Abhijith Das
@ 2007-06-27 15:50 ` Abhijith Das
  2007-06-27 15:56   ` Abhijith Das
  0 siblings, 1 reply; 5+ messages in thread
From: Abhijith Das @ 2007-06-27 15:50 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Abhijith Das wrote:

>The kernel threads in gfs2, namely gfs2_scand, gfs2_logd,
>gfs2_quotad, gfs2_glockd, gfs2_recoverd weren't doing anything when the suspend
>mechanism was trying to freeze them.
>
>I put in calls to refrigerator() in the loops for all the daemons and suspend works as expected.
>
>Signed-off-by: Abhijith Das <adas@redhat.com>
>--
>  
>
NACK! Based on IRC conversations with dct, swhiteho



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH] GFS2 - bz 192082: System won't suspend with GFS2 file system mounted
  2007-06-27 15:50 ` Abhijith Das
@ 2007-06-27 15:56   ` Abhijith Das
  2007-06-27 16:06     ` [Cluster-devel] [PATCH] GFS2 - bz 192082: System won't suspend with GFS2 file system mounted - FIXED Abhijith Das
  0 siblings, 1 reply; 5+ messages in thread
From: Abhijith Das @ 2007-06-27 15:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Abhijith Das wrote:

>Abhijith Das wrote:
>
>  
>
>>The kernel threads in gfs2, namely gfs2_scand, gfs2_logd,
>>gfs2_quotad, gfs2_glockd, gfs2_recoverd weren't doing anything when the suspend
>>mechanism was trying to freeze them.
>>
>>I put in calls to refrigerator() in the loops for all the daemons and suspend works as expected.
>>
>>Signed-off-by: Abhijith Das <adas@redhat.com>
>>--
>> 
>>
>>    
>>
>NACK! Based on IRC conversations with dct, swhiteho
>
>  
>
Try this one.

diff --git a/fs/gfs2/daemon.c b/fs/gfs2/daemon.c
index 683cb5b..3548d9f 100644
--- a/fs/gfs2/daemon.c
+++ b/fs/gfs2/daemon.c
@@ -16,6 +16,7 @@ #include <linux/kthread.h>
 #include <linux/delay.h>
 #include <linux/gfs2_ondisk.h>
 #include <linux/lm_interface.h>
+#include <linux/freezer.h>

 #include "gfs2.h"
 #include "incore.h"
@@ -49,6 +50,8 @@ int gfs2_scand(void *data)
        while (!kthread_should_stop()) {
                gfs2_scand_internal(sdp);
                t = gfs2_tune_get(sdp, gt_scand_secs) * HZ;
+               if (freezing(current))
+                       refrigerator();
                schedule_timeout_interruptible(t);
        }

@@ -74,6 +77,8 @@ int gfs2_glockd(void *data)
                wait_event_interruptible(sdp->sd_reclaim_wq,
                                        
(atomic_read(&sdp->sd_reclaim_count) ||
                                         kthread_should_stop()));
+               if (freezing(current))
+                       refrigerator();
        }

        return 0;
@@ -93,6 +98,8 @@ int gfs2_recoverd(void *data)
        while (!kthread_should_stop()) {
                gfs2_check_journals(sdp);
                t = gfs2_tune_get(sdp,  gt_recoverd_secs) * HZ;
+               if (freezing(current))
+                       refrigerator();
                schedule_timeout_interruptible(t);
        }

@@ -141,6 +148,8 @@ int gfs2_logd(void *data)
                }

                t = gfs2_tune_get(sdp, gt_logd_secs) * HZ;
+               if (freezing(current))
+                       refrigerator();
                schedule_timeout_interruptible(t);
        }

@@ -191,6 +200,8 @@ int gfs2_quotad(void *data)
                gfs2_quota_scan(sdp);

                t = gfs2_tune_get(sdp, gt_quotad_secs) * HZ;
+               if (freezing(current))
+                       refrigerator();
                schedule_timeout_interruptible(t);
        }




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH] GFS2 - bz 192082: System won't suspend with GFS2 file system mounted - FIXED
  2007-06-27 15:56   ` Abhijith Das
@ 2007-06-27 16:06     ` Abhijith Das
  2007-06-27 19:44       ` Steven Whitehouse
  0 siblings, 1 reply; 5+ messages in thread
From: Abhijith Das @ 2007-06-27 16:06 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Abhijith Das wrote:

>Abhijith Das wrote:
>
>  
>
>>Abhijith Das wrote:
>>
>> 
>>
>>    
>>
>>>The kernel threads in gfs2, namely gfs2_scand, gfs2_logd,
>>>gfs2_quotad, gfs2_glockd, gfs2_recoverd weren't doing anything when the suspend
>>>mechanism was trying to freeze them.
>>>
>>>I put in calls to refrigerator() in the loops for all the daemons and suspend works as expected.
>>>
>>>Signed-off-by: Abhijith Das <adas@redhat.com>
>>>--
>>>
>>>
>>>   
>>>
>>>      
>>>
>>NACK! Based on IRC conversations with dct, swhiteho
>>
>> 
>>
>>    
>>
>Try this one.
>
>  
>
T-bird might've broken that patch. Attached.
--Abhi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bz192082.patch
Type: text/x-patch
Size: 1468 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070627/c306a08e/attachment.bin>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH] GFS2 - bz 192082: System won't suspend with GFS2 file system mounted - FIXED
  2007-06-27 16:06     ` [Cluster-devel] [PATCH] GFS2 - bz 192082: System won't suspend with GFS2 file system mounted - FIXED Abhijith Das
@ 2007-06-27 19:44       ` Steven Whitehouse
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Whitehouse @ 2007-06-27 19:44 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

Now in the GFS2 -nme git tree. Thanks,

Steve.

On Wed, 2007-06-27 at 11:06 -0500, Abhijith Das wrote:
> Abhijith Das wrote:
> 
> >Abhijith Das wrote:
> >
> >  
> >
> >>Abhijith Das wrote:
> >>
> >> 
> >>
> >>    
> >>
> >>>The kernel threads in gfs2, namely gfs2_scand, gfs2_logd,
> >>>gfs2_quotad, gfs2_glockd, gfs2_recoverd weren't doing anything when the suspend
> >>>mechanism was trying to freeze them.
> >>>
> >>>I put in calls to refrigerator() in the loops for all the daemons and suspend works as expected.
> >>>
> >>>Signed-off-by: Abhijith Das <adas@redhat.com>
> >>>--
> >>>
> >>>
> >>>   
> >>>
> >>>      
> >>>
> >>NACK! Based on IRC conversations with dct, swhiteho
> >>
> >> 
> >>
> >>    
> >>
> >Try this one.
> >
> >  
> >
> T-bird might've broken that patch. Attached.
> --Abhi



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-06-27 19:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-27 15:40 [Cluster-devel] [PATCH] GFS2 - bz 192082: System won't suspend with GFS2 file system mounted Abhijith Das
2007-06-27 15:50 ` Abhijith Das
2007-06-27 15:56   ` Abhijith Das
2007-06-27 16:06     ` [Cluster-devel] [PATCH] GFS2 - bz 192082: System won't suspend with GFS2 file system mounted - FIXED Abhijith Das
2007-06-27 19:44       ` Steven Whitehouse

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.