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) | |
download | kernel-crypto-a25311c8e0b7071b129ca9a9e49e22eeaf620864.tar.gz kernel-crypto-a25311c8e0b7071b129ca9a9e49e22eeaf620864.tar.xz kernel-crypto-a25311c8e0b7071b129ca9a9e49e22eeaf620864.zip |
[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 6456fc39aac..7713d591867 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -15,6 +15,7 @@ #include <linux/gfs2_ondisk.h> #include <linux/crc32.h> #include <linux/lm_interface.h> +#include <linux/delay.h> #include "gfs2.h" #include "incore.h" @@ -142,7 +143,7 @@ static int gfs2_ail1_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai, int fl return list_empty(&ai->ai_ail1_list); } -void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags) +static void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags) { struct list_head *head = &sdp->sd_ail1_list; u64 sync_gen; @@ -689,3 +690,21 @@ void gfs2_log_shutdown(struct gfs2_sbd *sdp) up_write(&sdp->sd_log_flush_lock); } + +/** + * gfs2_meta_syncfs - sync all the buffers in a filesystem + * @sdp: the filesystem + * + */ + +void gfs2_meta_syncfs(struct gfs2_sbd *sdp) +{ + gfs2_log_flush(sdp, NULL); + for (;;) { + gfs2_ail1_start(sdp, DIO_ALL); + if (gfs2_ail1_empty(sdp, DIO_ALL)) + break; + msleep(10); + } +} + |