diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-23 11:06:35 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-30 10:36:45 -0500 |
commit | a25311c8e0b7071b129ca9a9e49e22eeaf620864 (patch) | |
tree | 6da042d3f24461b88d968d0ca7b85b37252c5e5a /fs/gfs2/log.c | |
parent | b004157ab5b374a498a5874cda68c389219d23e7 (diff) |
[GFS2] Move gfs2_meta_syncfs() into log.c
By moving gfs2_meta_syncfs() into log.c, gfs2_ail1_start()
can be made static.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/log.c')
-rw-r--r-- | fs/gfs2/log.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 6456fc39aace..7713d5918672 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/gfs2_ondisk.h> | 15 | #include <linux/gfs2_ondisk.h> |
16 | #include <linux/crc32.h> | 16 | #include <linux/crc32.h> |
17 | #include <linux/lm_interface.h> | 17 | #include <linux/lm_interface.h> |
18 | #include <linux/delay.h> | ||
18 | 19 | ||
19 | #include "gfs2.h" | 20 | #include "gfs2.h" |
20 | #include "incore.h" | 21 | #include "incore.h" |
@@ -142,7 +143,7 @@ static int gfs2_ail1_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai, int fl | |||
142 | return list_empty(&ai->ai_ail1_list); | 143 | return list_empty(&ai->ai_ail1_list); |
143 | } | 144 | } |
144 | 145 | ||
145 | void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags) | 146 | static void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags) |
146 | { | 147 | { |
147 | struct list_head *head = &sdp->sd_ail1_list; | 148 | struct list_head *head = &sdp->sd_ail1_list; |
148 | u64 sync_gen; | 149 | u64 sync_gen; |
@@ -689,3 +690,21 @@ void gfs2_log_shutdown(struct gfs2_sbd *sdp) | |||
689 | up_write(&sdp->sd_log_flush_lock); | 690 | up_write(&sdp->sd_log_flush_lock); |
690 | } | 691 | } |
691 | 692 | ||
693 | |||
694 | /** | ||
695 | * gfs2_meta_syncfs - sync all the buffers in a filesystem | ||
696 | * @sdp: the filesystem | ||
697 | * | ||
698 | */ | ||
699 | |||
700 | void gfs2_meta_syncfs(struct gfs2_sbd *sdp) | ||
701 | { | ||
702 | gfs2_log_flush(sdp, NULL); | ||
703 | for (;;) { | ||
704 | gfs2_ail1_start(sdp, DIO_ALL); | ||
705 | if (gfs2_ail1_empty(sdp, DIO_ALL)) | ||
706 | break; | ||
707 | msleep(10); | ||
708 | } | ||
709 | } | ||
710 | |||