From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13462 invoked by alias); 10 Jun 2009 16:30:45 -0000 Received: (qmail 13456 invoked by alias); 10 Jun 2009 16:30:44 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_66,SPF_HELO_PASS X-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_66,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion2.fedora.phx.redhat.com Subject: gfs2-utils: master - fsck.gfs2: Remove compute_height 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: 9bc8ca01cbbb5c4a013e153e34752e55d11dc7ed X-Git-Newrev: 8b6731a22d452d76585bac655f7878b51ba38054 From: Andrew Price Message-Id: <20090610163014.961E81201F2@lists.fedorahosted.org> Date: Wed, 10 Jun 2009 16:30: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-q2/txt/msg00494.txt.bz2 Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=8b6731a22d452d76585bac655f7878b51ba38054 Commit: 8b6731a22d452d76585bac655f7878b51ba38054 Parent: 9bc8ca01cbbb5c4a013e153e34752e55d11dc7ed Author: Andrew Price AuthorDate: Wed Jun 10 17:09:25 2009 +0100 Committer: Andrew Price CommitterDate: Wed Jun 10 17:12:42 2009 +0100 fsck.gfs2: Remove compute_height Commit 9bc8ca removed the last two calls to this function so it can be removed. Signed-off-by: Andrew Price --- gfs2/fsck/util.c | 31 ------------------------------- gfs2/fsck/util.h | 1 - 2 files changed, 0 insertions(+), 32 deletions(-) diff --git a/gfs2/fsck/util.c b/gfs2/fsck/util.c index af88a7f..eac0e1b 100644 --- a/gfs2/fsck/util.c +++ b/gfs2/fsck/util.c @@ -11,37 +11,6 @@ #include "fs_bits.h" #include "util.h" -/** - * compute_height - * @sdp: - * @sz: - * - */ -int compute_height(struct gfs2_sbd *sdp, uint64_t sz) -{ - unsigned int height; - uint64_t space, old_space; - unsigned int bsize = sdp->sd_sb.sb_bsize; - - if (sz <= (bsize - sizeof(struct gfs2_dinode))) - return 0; - - height = 1; - space = sdp->sd_diptrs * bsize; - - while (sz > space) { - old_space = space; - - height++; - space *= sdp->sd_inptrs; - - if (space / sdp->sd_inptrs != old_space || - space % sdp->sd_inptrs != 0) - break; - } - return height; -} - /* Put out a warm, fuzzy message every second so the user */ /* doesn't think we hung. (This may take a long time). */ void warm_fuzzy_stuff(uint64_t block) diff --git a/gfs2/fsck/util.h b/gfs2/fsck/util.h index 96d7c46..f84ab41 100644 --- a/gfs2/fsck/util.h +++ b/gfs2/fsck/util.h @@ -6,7 +6,6 @@ #define fsck_lseek(fd, off) \ ((lseek((fd), (off), SEEK_SET) == (off)) ? 0 : -1) -int compute_height(struct gfs2_sbd *sdp, uint64_t sz); struct di_info *search_list(osi_list_t *list, uint64_t addr); void warm_fuzzy_stuff(uint64_t block); const char *block_type_string(struct gfs2_block_query *q);