* [Cluster-devel] [PATCH] fsck.gfs2: Remove compute_height
@ 2009-06-10 16:20 Andrew Price
2009-06-10 16:24 ` Steven Whitehouse
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Price @ 2009-06-10 16:20 UTC (permalink / raw)
To: cluster-devel.redhat.com
Commit 9bc8ca removed the last two calls to this function so it can be
removed.
Signed-off-by: Andrew Price <andy@andrewprice.me.uk>
---
I am of course assuming that this function will not be required in future, but
then it could be resurrected if necessary anyway.
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);
--
1.6.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] [PATCH] fsck.gfs2: Remove compute_height
2009-06-10 16:20 [Cluster-devel] [PATCH] fsck.gfs2: Remove compute_height Andrew Price
@ 2009-06-10 16:24 ` Steven Whitehouse
0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2009-06-10 16:24 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Looks good to me,
Steve.
On Wed, 2009-06-10 at 17:20 +0100, Andrew Price wrote:
> Commit 9bc8ca removed the last two calls to this function so it can be
> removed.
>
> Signed-off-by: Andrew Price <andy@andrewprice.me.uk>
> ---
>
> I am of course assuming that this function will not be required in future, but
> then it could be resurrected if necessary anyway.
>
> 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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-10 16:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-10 16:20 [Cluster-devel] [PATCH] fsck.gfs2: Remove compute_height Andrew Price
2009-06-10 16:24 ` Steven Whitehouse
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.