diff options
author | Abhijith Das <adas@redhat.com> | 2007-06-27 12:06:19 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2007-07-09 03:24:04 -0400 |
commit | b3657629249eba0b3b61ff964d6e1539b469d117 (patch) | |
tree | 60db7f1b29c5e5432510986f3b3f2081acf4c991 /fs/gfs2 | |
parent | 569a7b6c2e8965ff4908003b925757703a3d649c (diff) |
[GFS2] System won't suspend with GFS2 file system mounted
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>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/daemon.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/gfs2/daemon.c b/fs/gfs2/daemon.c index 683cb5bda870..3548d9f31e0d 100644 --- a/fs/gfs2/daemon.c +++ b/fs/gfs2/daemon.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/gfs2_ondisk.h> | 17 | #include <linux/gfs2_ondisk.h> |
18 | #include <linux/lm_interface.h> | 18 | #include <linux/lm_interface.h> |
19 | #include <linux/freezer.h> | ||
19 | 20 | ||
20 | #include "gfs2.h" | 21 | #include "gfs2.h" |
21 | #include "incore.h" | 22 | #include "incore.h" |
@@ -49,6 +50,8 @@ int gfs2_scand(void *data) | |||
49 | while (!kthread_should_stop()) { | 50 | while (!kthread_should_stop()) { |
50 | gfs2_scand_internal(sdp); | 51 | gfs2_scand_internal(sdp); |
51 | t = gfs2_tune_get(sdp, gt_scand_secs) * HZ; | 52 | t = gfs2_tune_get(sdp, gt_scand_secs) * HZ; |
53 | if (freezing(current)) | ||
54 | refrigerator(); | ||
52 | schedule_timeout_interruptible(t); | 55 | schedule_timeout_interruptible(t); |
53 | } | 56 | } |
54 | 57 | ||
@@ -74,6 +77,8 @@ int gfs2_glockd(void *data) | |||
74 | wait_event_interruptible(sdp->sd_reclaim_wq, | 77 | wait_event_interruptible(sdp->sd_reclaim_wq, |
75 | (atomic_read(&sdp->sd_reclaim_count) || | 78 | (atomic_read(&sdp->sd_reclaim_count) || |
76 | kthread_should_stop())); | 79 | kthread_should_stop())); |
80 | if (freezing(current)) | ||
81 | refrigerator(); | ||
77 | } | 82 | } |
78 | 83 | ||
79 | return 0; | 84 | return 0; |
@@ -93,6 +98,8 @@ int gfs2_recoverd(void *data) | |||
93 | while (!kthread_should_stop()) { | 98 | while (!kthread_should_stop()) { |
94 | gfs2_check_journals(sdp); | 99 | gfs2_check_journals(sdp); |
95 | t = gfs2_tune_get(sdp, gt_recoverd_secs) * HZ; | 100 | t = gfs2_tune_get(sdp, gt_recoverd_secs) * HZ; |
101 | if (freezing(current)) | ||
102 | refrigerator(); | ||
96 | schedule_timeout_interruptible(t); | 103 | schedule_timeout_interruptible(t); |
97 | } | 104 | } |
98 | 105 | ||
@@ -141,6 +148,8 @@ int gfs2_logd(void *data) | |||
141 | } | 148 | } |
142 | 149 | ||
143 | t = gfs2_tune_get(sdp, gt_logd_secs) * HZ; | 150 | t = gfs2_tune_get(sdp, gt_logd_secs) * HZ; |
151 | if (freezing(current)) | ||
152 | refrigerator(); | ||
144 | schedule_timeout_interruptible(t); | 153 | schedule_timeout_interruptible(t); |
145 | } | 154 | } |
146 | 155 | ||
@@ -191,6 +200,8 @@ int gfs2_quotad(void *data) | |||
191 | gfs2_quota_scan(sdp); | 200 | gfs2_quota_scan(sdp); |
192 | 201 | ||
193 | t = gfs2_tune_get(sdp, gt_quotad_secs) * HZ; | 202 | t = gfs2_tune_get(sdp, gt_quotad_secs) * HZ; |
203 | if (freezing(current)) | ||
204 | refrigerator(); | ||
194 | schedule_timeout_interruptible(t); | 205 | schedule_timeout_interruptible(t); |
195 | } | 206 | } |
196 | 207 | ||