* [GFS2] Move gfs2_meta_syncfs() into log.c [57/70]
@ 2006-11-30 12:22 Steven Whitehouse
2006-12-01 19:16 ` Russell Cattelan
0 siblings, 1 reply; 2+ messages in thread
From: Steven Whitehouse @ 2006-11-30 12:22 UTC (permalink / raw)
To: cluster-devel, linux-kernel
>From a25311c8e0b7071b129ca9a9e49e22eeaf620864 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Thu, 23 Nov 2006 11:06:35 -0500
Subject: [PATCH] [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>
---
fs/gfs2/log.c | 21 ++++++++++++++++++++-
fs/gfs2/log.h | 2 +-
fs/gfs2/meta_io.c | 17 -----------------
fs/gfs2/meta_io.h | 1 -
4 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 6456fc3..7713d59 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -15,6 +15,7 @@ #include <linux/buffer_head.h>
#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 gf
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 *
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);
+ }
+}
+
diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h
index 7f5737d..8e7aa0f 100644
--- a/fs/gfs2/log.h
+++ b/fs/gfs2/log.h
@@ -48,7 +48,6 @@ static inline void gfs2_log_pointers_ini
unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct,
unsigned int ssize);
-void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags);
int gfs2_ail1_empty(struct gfs2_sbd *sdp, int flags);
int gfs2_log_reserve(struct gfs2_sbd *sdp, unsigned int blks);
@@ -61,5 +60,6 @@ void gfs2_log_flush(struct gfs2_sbd *sdp
void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *trans);
void gfs2_log_shutdown(struct gfs2_sbd *sdp);
+void gfs2_meta_syncfs(struct gfs2_sbd *sdp);
#endif /* __LOG_DOT_H__ */
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index 939a09f..fbeba81 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -574,20 +574,3 @@ out:
return first_bh;
}
-/**
- * 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);
- }
-}
-
diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h
index 3ec939e..e037425 100644
--- a/fs/gfs2/meta_io.h
+++ b/fs/gfs2/meta_io.h
@@ -67,7 +67,6 @@ static inline int gfs2_meta_inode_buffer
}
struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen);
-void gfs2_meta_syncfs(struct gfs2_sbd *sdp);
#define buffer_busy(bh) \
((bh)->b_state & ((1ul << BH_Dirty) | (1ul << BH_Lock) | (1ul << BH_Pinned)))
--
1.4.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [GFS2] Move gfs2_meta_syncfs() into log.c [57/70]
2006-11-30 12:22 [GFS2] Move gfs2_meta_syncfs() into log.c [57/70] Steven Whitehouse
@ 2006-12-01 19:16 ` Russell Cattelan
0 siblings, 0 replies; 2+ messages in thread
From: Russell Cattelan @ 2006-12-01 19:16 UTC (permalink / raw)
To: Steven Whitehouse; +Cc: cluster-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3766 bytes --]
On Thu, 2006-11-30 at 12:22 +0000, Steven Whitehouse wrote:
> >From a25311c8e0b7071b129ca9a9e49e22eeaf620864 Mon Sep 17 00:00:00 2001
> From: Steven Whitehouse <swhiteho@redhat.com>
> Date: Thu, 23 Nov 2006 11:06:35 -0500
> Subject: [PATCH] [GFS2] Move gfs2_meta_syncfs() into log.c
>
> By moving gfs2_meta_syncfs() into log.c, gfs2_ail1_start()
> can be made static.
While this is not a incorrect change as it stands.
This kind of pointless code curn is making it harder
to stabilize GFS2.
>
> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
> ---
> fs/gfs2/log.c | 21 ++++++++++++++++++++-
> fs/gfs2/log.h | 2 +-
> fs/gfs2/meta_io.c | 17 -----------------
> fs/gfs2/meta_io.h | 1 -
> 4 files changed, 21 insertions(+), 20 deletions(-)
>
> diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
> index 6456fc3..7713d59 100644
> --- a/fs/gfs2/log.c
> +++ b/fs/gfs2/log.c
> @@ -15,6 +15,7 @@ #include <linux/buffer_head.h>
> #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 gf
> 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 *
> 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);
> + }
> +}
> +
> diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h
> index 7f5737d..8e7aa0f 100644
> --- a/fs/gfs2/log.h
> +++ b/fs/gfs2/log.h
> @@ -48,7 +48,6 @@ static inline void gfs2_log_pointers_ini
> unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct,
> unsigned int ssize);
>
> -void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags);
> int gfs2_ail1_empty(struct gfs2_sbd *sdp, int flags);
>
> int gfs2_log_reserve(struct gfs2_sbd *sdp, unsigned int blks);
> @@ -61,5 +60,6 @@ void gfs2_log_flush(struct gfs2_sbd *sdp
> void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *trans);
>
> void gfs2_log_shutdown(struct gfs2_sbd *sdp);
> +void gfs2_meta_syncfs(struct gfs2_sbd *sdp);
>
> #endif /* __LOG_DOT_H__ */
> diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
> index 939a09f..fbeba81 100644
> --- a/fs/gfs2/meta_io.c
> +++ b/fs/gfs2/meta_io.c
> @@ -574,20 +574,3 @@ out:
> return first_bh;
> }
>
> -/**
> - * 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);
> - }
> -}
> -
> diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h
> index 3ec939e..e037425 100644
> --- a/fs/gfs2/meta_io.h
> +++ b/fs/gfs2/meta_io.h
> @@ -67,7 +67,6 @@ static inline int gfs2_meta_inode_buffer
> }
>
> struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen);
> -void gfs2_meta_syncfs(struct gfs2_sbd *sdp);
>
> #define buffer_busy(bh) \
> ((bh)->b_state & ((1ul << BH_Dirty) | (1ul << BH_Lock) | (1ul << BH_Pinned)))
--
Russell Cattelan <cattelan@thebarn.com>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-01 19:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-30 12:22 [GFS2] Move gfs2_meta_syncfs() into log.c [57/70] Steven Whitehouse
2006-12-01 19:16 ` Russell Cattelan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®