aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/recovery.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-11-19 05:08:22 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2009-01-05 02:39:07 -0500
commit9ac1b4d9b6f885ccd7d8f56bceb609003a920ff7 (patch)
tree3208c627ca63e4167b2ce1d4bf4849b478d7a0e4 /fs/gfs2/recovery.c
parent813e0c46c9e2a0c6f0b6e774faac82afd7a2e812 (diff)
GFS2: Move gfs2_recoverd into recovery.c
By moving gfs2_recoverd, we can make an additional function static and it also leaves only (the already scheduled for removal) gfs2_glockd in daemon.c. At the same time the declaration of gfs2_quotad is moved to quota.h to reflect the new location of gfs2_quotad in a previous patch. Also the recovery.h and quota.h headers are cleaned up. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/recovery.c')
-rw-r--r--fs/gfs2/recovery.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index d5e91f4f6a0b..b56ba3db7771 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -14,6 +14,8 @@
14#include <linux/gfs2_ondisk.h> 14#include <linux/gfs2_ondisk.h>
15#include <linux/crc32.h> 15#include <linux/crc32.h>
16#include <linux/lm_interface.h> 16#include <linux/lm_interface.h>
17#include <linux/kthread.h>
18#include <linux/freezer.h>
17 19
18#include "gfs2.h" 20#include "gfs2.h"
19#include "incore.h" 21#include "incore.h"
@@ -589,7 +591,7 @@ fail:
589 * 591 *
590 */ 592 */
591 593
592void gfs2_check_journals(struct gfs2_sbd *sdp) 594static void gfs2_check_journals(struct gfs2_sbd *sdp)
593{ 595{
594 struct gfs2_jdesc *jd; 596 struct gfs2_jdesc *jd;
595 597
@@ -603,3 +605,25 @@ void gfs2_check_journals(struct gfs2_sbd *sdp)
603 } 605 }
604} 606}
605 607
608/**
609 * gfs2_recoverd - Recover dead machine's journals
610 * @sdp: Pointer to GFS2 superblock
611 *
612 */
613
614int gfs2_recoverd(void *data)
615{
616 struct gfs2_sbd *sdp = data;
617 unsigned long t;
618
619 while (!kthread_should_stop()) {
620 gfs2_check_journals(sdp);
621 t = gfs2_tune_get(sdp, gt_recoverd_secs) * HZ;
622 if (freezing(current))
623 refrigerator();
624 schedule_timeout_interruptible(t);
625 }
626
627 return 0;
628}
629