From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18715 invoked by alias); 27 Jan 2009 15:19:29 -0000 Received: (qmail 18708 invoked by alias); 27 Jan 2009 15:19:29 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_35,KAM_MX,SPF_HELO_PASS X-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_35,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com Subject: gfs2-utils: master - libgfs2: DIV_RU Macro bites the dust To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: gfs2-utils.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: f53e675305f33c91bf78abad58be77b11e3fa89f X-Git-Newrev: 91c3e9a69ed70d3d522f5b47015da5e5868722ec From: Steven Whitehouse Message-Id: <20090127151820.ACA47C024D@lists.fedorahosted.org> Date: Tue, 27 Jan 2009 15:19:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00296.txt.bz2 Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=91c3e9a69ed70d3d522f5b47015da5e5868722ec Commit: 91c3e9a69ed70d3d522f5b47015da5e5868722ec Parent: f53e675305f33c91bf78abad58be77b11e3fa89f Author: Steven Whitehouse AuthorDate: Tue Jan 27 14:17:36 2009 +0000 Committer: Steven Whitehouse 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 --- 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 #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,