gfs2-utils: master - libgfs2: DIV_RU Macro bites the dust

Steven Whitehouse swhiteho@fedoraproject.org
Tue Jan 27 15:19:00 GMT 2009


Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=91c3e9a69ed70d3d522f5b47015da5e5868722ec
Commit:        91c3e9a69ed70d3d522f5b47015da5e5868722ec
Parent:        f53e675305f33c91bf78abad58be77b11e3fa89f
Author:        Steven Whitehouse <swhiteho@redhat.com>
AuthorDate:    Tue Jan 27 14:17:36 2009 +0000
Committer:     Steven Whitehouse <swhiteho@redhat.com>
CommitterDate: Tue Jan 27 14:17:36 2009 +0000

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,



More information about the Cluster-cvs mailing list