FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 04-30-2012, 05:29 PM
Andrew Price
 
Default libgfs2: Remove gfs_get_leaf_nr

gfs2_get_leaf_nr and gfs_get_leaf_nr are identical so we can remove
gfs_get_leaf_nr.

Signed-off-by: Andrew Price <anprice@redhat.com>
---
gfs2/libgfs2/fs_ops.c | 2 --
gfs2/libgfs2/gfs1.c | 16 ----------------
gfs2/libgfs2/libgfs2.h | 2 --
3 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index a72394f..470916c 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -851,8 +851,6 @@ void gfs2_get_leaf_nr(struct gfs2_inode *dip, uint32_t lindex,
uint64_t leaf_no;
int count;

- if (dip->i_sbd->gfs1)
- return gfs_get_leaf_nr(dip, lindex, leaf_out);
count = gfs2_readi(dip, (char *)&leaf_no, lindex * sizeof(uint64_t),
sizeof(uint64_t));
if (count != sizeof(uint64_t)) {
diff --git a/gfs2/libgfs2/gfs1.c b/gfs2/libgfs2/gfs1.c
index 8e3fc93..d6f8794 100644
--- a/gfs2/libgfs2/gfs1.c
+++ b/gfs2/libgfs2/gfs1.c
@@ -395,22 +395,6 @@ void gfs_rgrp_out(struct gfs_rgrp *rgrp, struct gfs2_buffer_head *rbh)
bmodified(rbh);
}

-void gfs_get_leaf_nr(struct gfs2_inode *dip, uint32_t lindex,
- uint64_t *leaf_out)
-{
- uint64_t leaf_no;
- int count;
-
- count = gfs2_readi(dip, (char *)&leaf_no, lindex * sizeof(uint64_t),
- sizeof(uint64_t));
- if (count != sizeof(uint64_t)) {
- fprintf(stderr, "gfs_get_leaf_nr: Bad internal read.
");
- exit(1);
- }
-
- *leaf_out = be64_to_cpu(leaf_no);
-}
-
void gfs_put_leaf_nr(struct gfs2_inode *dip, uint32_t inx, uint64_t leaf_out)
{
uint64_t leaf_no;
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 4bd01a8..e2a7e45 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -660,8 +660,6 @@ extern struct gfs2_inode *gfs_inode_read(struct gfs2_sbd *sdp,
extern void gfs_jindex_in(struct gfs_jindex *jindex, char *buf);
extern void gfs_rgrp_in(struct gfs_rgrp *rg, struct gfs2_buffer_head *bh);
extern void gfs_rgrp_out(struct gfs_rgrp *rg, struct gfs2_buffer_head *bh);
-extern void gfs_get_leaf_nr(struct gfs2_inode *dip, uint32_t lindex,
- uint64_t *leaf_out);
extern void gfs_put_leaf_nr(struct gfs2_inode *dip, uint32_t inx,
uint64_t leaf_out);

--
1.7.7.6
 
Old 05-01-2012, 09:22 AM
Steven Whitehouse
 
Default libgfs2: Remove gfs_get_leaf_nr

Hi,

Looks good to me,

Steve.

On Mon, 2012-04-30 at 18:29 +0100, Andrew Price wrote:
> gfs2_get_leaf_nr and gfs_get_leaf_nr are identical so we can remove
> gfs_get_leaf_nr.
>
> Signed-off-by: Andrew Price <anprice@redhat.com>
> ---
> gfs2/libgfs2/fs_ops.c | 2 --
> gfs2/libgfs2/gfs1.c | 16 ----------------
> gfs2/libgfs2/libgfs2.h | 2 --
> 3 files changed, 0 insertions(+), 20 deletions(-)
>
> diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
> index a72394f..470916c 100644
> --- a/gfs2/libgfs2/fs_ops.c
> +++ b/gfs2/libgfs2/fs_ops.c
> @@ -851,8 +851,6 @@ void gfs2_get_leaf_nr(struct gfs2_inode *dip, uint32_t lindex,
> uint64_t leaf_no;
> int count;
>
> - if (dip->i_sbd->gfs1)
> - return gfs_get_leaf_nr(dip, lindex, leaf_out);
> count = gfs2_readi(dip, (char *)&leaf_no, lindex * sizeof(uint64_t),
> sizeof(uint64_t));
> if (count != sizeof(uint64_t)) {
> diff --git a/gfs2/libgfs2/gfs1.c b/gfs2/libgfs2/gfs1.c
> index 8e3fc93..d6f8794 100644
> --- a/gfs2/libgfs2/gfs1.c
> +++ b/gfs2/libgfs2/gfs1.c
> @@ -395,22 +395,6 @@ void gfs_rgrp_out(struct gfs_rgrp *rgrp, struct gfs2_buffer_head *rbh)
> bmodified(rbh);
> }
>
> -void gfs_get_leaf_nr(struct gfs2_inode *dip, uint32_t lindex,
> - uint64_t *leaf_out)
> -{
> - uint64_t leaf_no;
> - int count;
> -
> - count = gfs2_readi(dip, (char *)&leaf_no, lindex * sizeof(uint64_t),
> - sizeof(uint64_t));
> - if (count != sizeof(uint64_t)) {
> - fprintf(stderr, "gfs_get_leaf_nr: Bad internal read.
");
> - exit(1);
> - }
> -
> - *leaf_out = be64_to_cpu(leaf_no);
> -}
> -
> void gfs_put_leaf_nr(struct gfs2_inode *dip, uint32_t inx, uint64_t leaf_out)
> {
> uint64_t leaf_no;
> diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
> index 4bd01a8..e2a7e45 100644
> --- a/gfs2/libgfs2/libgfs2.h
> +++ b/gfs2/libgfs2/libgfs2.h
> @@ -660,8 +660,6 @@ extern struct gfs2_inode *gfs_inode_read(struct gfs2_sbd *sdp,
> extern void gfs_jindex_in(struct gfs_jindex *jindex, char *buf);
> extern void gfs_rgrp_in(struct gfs_rgrp *rg, struct gfs2_buffer_head *bh);
> extern void gfs_rgrp_out(struct gfs_rgrp *rg, struct gfs2_buffer_head *bh);
> -extern void gfs_get_leaf_nr(struct gfs2_inode *dip, uint32_t lindex,
> - uint64_t *leaf_out);
> extern void gfs_put_leaf_nr(struct gfs2_inode *dip, uint32_t inx,
> uint64_t leaf_out);
>
 

Thread Tools




All times are GMT. The time now is 10:05 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org