From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 1/2] libgfs2: Remove gfs_get_leaf_nr
Date: Mon, 30 Apr 2012 18:29:47 +0100 [thread overview]
Message-ID: <1335806988-24872-1-git-send-email-anprice@redhat.com> (raw)
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.\n");
- 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
next reply other threads:[~2012-04-30 17:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 17:29 Andrew Price [this message]
2012-04-30 17:29 ` [Cluster-devel] [PATCH 2/2] libgfs2: Clean up some warnings Andrew Price
2012-05-01 9:23 ` Steven Whitehouse
2012-05-01 9:22 ` [Cluster-devel] [PATCH 1/2] libgfs2: Remove gfs_get_leaf_nr Steven Whitehouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335806988-24872-1-git-send-email-anprice@redhat.com \
--to=anprice@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).