This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: STABLE3 - libgfs2: DIV_RU Macro bites the dust
- From: "Fabio M. Di Nitto" <fabbione at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Thu, 19 Feb 2009 10:09:19 +0000 (UTC)
- Subject: cluster: STABLE3 - libgfs2: DIV_RU Macro bites the dust
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=b1ea15c55e5ac33251caf76f82dcae9ceb986aa1
Commit: b1ea15c55e5ac33251caf76f82dcae9ceb986aa1
Parent: c7c2d00d65119f3df8307dda02b33a05fa0146d2
Author: Steven Whitehouse <swhiteho@redhat.com>
AuthorDate: Tue Jan 27 14:17:36 2009 +0000
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Thu Feb 19 10:59:57 2009 +0100
libgfs2: DIV_RU Macro bites the dust
This was only used internally, so I've moved it to the files where
it is needed.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
gfs2/libgfs2/fs_geometry.c | 2 ++
gfs2/libgfs2/libgfs2.h | 2 --
gfs2/libgfs2/misc.c | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gfs2/libgfs2/fs_geometry.c b/gfs2/libgfs2/fs_geometry.c
index 2d9b8a7..c855214 100644
--- a/gfs2/libgfs2/fs_geometry.c
+++ b/gfs2/libgfs2/fs_geometry.c
@@ -12,6 +12,8 @@
#include <linux/types.h>
#include "libgfs2.h"
+#define DIV_RU(x, y) (((x) + (y) - 1) / (y))
+
/**
* how_many_rgrps - figure out how many RG to put in a subdevice
* @w: the command line
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index db24bb9..b37fd0d 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -79,8 +79,6 @@ static __inline__ __attribute__((noreturn)) void die(const char *fmt, ...)
exit(-1);
}
-#define DIV_RU(x, y) (((x) + (y) - 1) / (y))
-
struct device {
uint64_t start;
uint64_t length;
diff --git a/gfs2/libgfs2/misc.c b/gfs2/libgfs2/misc.c
index 72b9eef..2cd6e46 100644
--- a/gfs2/libgfs2/misc.c
+++ b/gfs2/libgfs2/misc.c
@@ -20,6 +20,8 @@
#define PAGE_SIZE (4096)
#define SYS_BASE "/sys/fs/gfs2" /* FIXME: Look in /proc/mounts to find this */
+#define DIV_RU(x, y) (((x) + (y) - 1) / (y))
+
static char sysfs_buf[PAGE_SIZE];
uint32_t compute_heightsize(struct gfs2_sbd *sdp, uint64_t *heightsize,