This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch main
in repository gfs2-utils.
commit f7538c765f0bb73548294a24d9ca723b361f20e0
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon Jan 17 19:34:50 2022 +0000
libgfs2: Namespace improvements - super.c
Use the lgfs2_ prefix in libgfs2 interface names.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/convert/gfs2_convert.c | 2 +-
gfs2/edit/hexedit.c | 2 +-
gfs2/edit/savemeta.c | 2 +-
gfs2/fsck/initialize.c | 6 +++---
gfs2/fsck/rgrepair.c | 2 +-
gfs2/libgfs2/gfs2l.c | 4 ++--
gfs2/libgfs2/libgfs2.h | 8 ++++----
gfs2/libgfs2/super.c | 14 +++++++-------
gfs2/mkfs/main_grow.c | 2 +-
tests/nukerg.c | 2 +-
10 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 1608b1ad..c6b388a6 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -1526,7 +1526,7 @@ static int gfs1_ri_update(struct gfs2_sbd *sdp, int *rgcount, int
quiet)
struct osi_node *n, *next = NULL;
int ok;
- if (rindex_read(sdp, &count1, &ok))
+ if (lgfs2_rindex_read(sdp, &count1, &ok))
goto fail;
for (n = osi_first(&sdp->rgtree); n; n = next) {
next = osi_next(n);
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index b0f110c1..fc1b5f4f 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -939,7 +939,7 @@ static int read_rindex(void)
sbd.fssize = sbd.device.length;
if (sbd.md.riinode) /* If we found the rindex */
- rindex_read(&sbd, &count, &ok);
+ lgfs2_rindex_read(&sbd, &count, &ok);
if (!OSI_EMPTY_ROOT(&sbd.rgtree)) {
struct rgrp_tree *rg = (struct rgrp_tree *)osi_last(&sbd.rgtree);
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 21c67989..ffb11342 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -1254,7 +1254,7 @@ static int restore_super(struct metafd *mfd, void *buf, int
printonly)
int ret;
lgfs2_sb_in(&sbd, buf);
- ret = check_sb(buf);
+ ret = lgfs2_check_sb(buf);
if (ret < 0) {
fprintf(stderr, "Error: Invalid superblock in metadata file.\n");
return -1;
diff --git a/gfs2/fsck/initialize.c b/gfs2/fsck/initialize.c
index 18522a35..2740fa7d 100644
--- a/gfs2/fsck/initialize.c
+++ b/gfs2/fsck/initialize.c
@@ -721,7 +721,7 @@ static int fetch_rgrps_level(struct gfs2_sbd *sdp, enum
rgindex_trust_level lvl,
if (rindex_repair(sdp, lvl, ok) != 0)
goto fail;
- if (rindex_read(sdp, count, ok) != 0 || !*ok)
+ if (lgfs2_rindex_read(sdp, count, ok) != 0 || !*ok)
goto fail;
ret = read_rgrps(sdp, *count);
@@ -1345,12 +1345,12 @@ static int fill_super_block(struct gfs2_sbd *sdp)
log_crit("%s\n", _("Failed to compute file system constants"));
return FSCK_ERROR;
}
- ret = read_sb(sdp);
+ ret = lgfs2_read_sb(sdp);
if (ret < 0) {
if (sb_repair(sdp) != 0)
return -1; /* unrepairable, so exit */
/* Now that we've tried to repair it, re-read it. */
- ret = read_sb(sdp);
+ ret = lgfs2_read_sb(sdp);
if (ret < 0)
return FSCK_ERROR;
}
diff --git a/gfs2/fsck/rgrepair.c b/gfs2/fsck/rgrepair.c
index 8c2dd35d..333a77a5 100644
--- a/gfs2/fsck/rgrepair.c
+++ b/gfs2/fsck/rgrepair.c
@@ -999,7 +999,7 @@ int rindex_repair(struct gfs2_sbd *sdp, int trust_lvl, int *ok)
}
/* Read in the rindex */
sdp->rgtree.osi_node = NULL; /* Just to be safe */
- rindex_read(sdp, &sdp->rgrps, ok);
+ lgfs2_rindex_read(sdp, &sdp->rgrps, ok);
if (sdp->md.riinode->i_size % sizeof(struct gfs2_rindex)) {
log_warn( _("WARNING: rindex file has an invalid size.\n"));
if (!query( _("Truncate the rindex size? (y/n)"))) {
diff --git a/gfs2/libgfs2/gfs2l.c b/gfs2/libgfs2/gfs2l.c
index 2ec4a1a1..a247bed2 100644
--- a/gfs2/libgfs2/gfs2l.c
+++ b/gfs2/libgfs2/gfs2l.c
@@ -132,7 +132,7 @@ static int openfs(const char *path, struct gfs2_sbd *sdp)
}
fix_device_geometry(sdp);
- ret = read_sb(sdp);
+ ret = lgfs2_read_sb(sdp);
if (ret != 0) {
perror("Could not read sb");
return 1;
@@ -142,7 +142,7 @@ static int openfs(const char *path, struct gfs2_sbd *sdp)
lgfs2_lookupi(sdp->master_dir, "rindex", 6, &sdp->md.riinode);
sdp->fssize = sdp->device.length;
if (sdp->md.riinode) {
- rindex_read(sdp, &count, &ok);
+ lgfs2_rindex_read(sdp, &count, &ok);
} else {
perror("Failed to look up rindex");
return 1;
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index b204b763..aede5cda 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -778,10 +778,10 @@ extern struct gfs2_inode *lgfs2_build_statfs_change(struct
gfs2_inode *per_node,
extern struct gfs2_inode *lgfs2_build_quota_change(struct gfs2_inode *per_node, unsigned
int j);
/* super.c */
-extern int check_sb(void *sbp);
-extern int read_sb(struct gfs2_sbd *sdp);
-extern int rindex_read(struct gfs2_sbd *sdp, uint64_t *rgcount, int *ok);
-extern int write_sb(struct gfs2_sbd *sdp);
+extern int lgfs2_check_sb(void *sbp);
+extern int lgfs2_read_sb(struct gfs2_sbd *sdp);
+extern int lgfs2_rindex_read(struct gfs2_sbd *sdp, uint64_t *rgcount, int *ok);
+extern int lgfs2_write_sb(struct gfs2_sbd *sdp);
/* ondisk.c */
extern uint32_t gfs2_disk_hash(const char *data, int len);
diff --git a/gfs2/libgfs2/super.c b/gfs2/libgfs2/super.c
index da605ded..c8186b20 100644
--- a/gfs2/libgfs2/super.c
+++ b/gfs2/libgfs2/super.c
@@ -13,7 +13,7 @@
#include "osi_list.h"
/**
- * check_sb - Check superblock
+ * lgfs2_check_sb - Check superblock
* @sb: The superblock
*
* Checks the version code of the FS is one that we understand how to
@@ -22,7 +22,7 @@
*
* Returns: -1 on failure, 1 if this is gfs (gfs1), 2 if this is gfs2
*/
-int check_sb(void *sbp)
+int lgfs2_check_sb(void *sbp)
{
struct gfs2_sb *sb = sbp;
@@ -48,7 +48,7 @@ int check_sb(void *sbp)
/*
- * read_sb: read the super block from disk
+ * lgfs2_read_sb: read the super block from disk
* sdp: in-core super block
*
* This function reads in the super block from disk and
@@ -58,7 +58,7 @@ int check_sb(void *sbp)
* Returns: 0 on success, -1 on failure
* sdp->gfs1 will be set if this is gfs (gfs1)
*/
-int read_sb(struct gfs2_sbd *sdp)
+int lgfs2_read_sb(struct gfs2_sbd *sdp)
{
struct gfs2_buffer_head *bh;
uint64_t space = 0;
@@ -67,7 +67,7 @@ int read_sb(struct gfs2_sbd *sdp)
bh = lgfs2_bread(sdp, GFS2_SB_ADDR >> sdp->sd_fsb2bb_shift);
- ret = check_sb(bh->b_data);
+ ret = lgfs2_check_sb(bh->b_data);
if (ret < 0) {
lgfs2_brelse(bh);
return ret;
@@ -191,14 +191,14 @@ static int good_on_disk(struct gfs2_sbd *sdp, struct rgrp_tree
*rgd)
}
/**
- * rindex_read - read in the rg index file
+ * lgfs2_rindex_read - read in the rg index file
* @sdp: the incore superblock pointer
* @rgcount: return count of the rgs.
* @ok: return whether rindex is consistent
*
* Returns: 0 on success, -1 on failure
*/
-int rindex_read(struct gfs2_sbd *sdp, uint64_t *rgcount, int *ok)
+int lgfs2_rindex_read(struct gfs2_sbd *sdp, uint64_t *rgcount, int *ok)
{
unsigned int rg;
int error;
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index 4ce24c90..298ba2a6 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -398,7 +398,7 @@ int main(int argc, char *argv[])
log_crit("%s\n", _("Failed to compute file system constants"));
exit(EXIT_FAILURE);
}
- if (read_sb(sdp) < 0) {
+ if (lgfs2_read_sb(sdp) < 0) {
fprintf(stderr, _("Error reading superblock.\n"));
exit(EXIT_FAILURE);
}
diff --git a/tests/nukerg.c b/tests/nukerg.c
index 49bbda74..e24151ef 100644
--- a/tests/nukerg.c
+++ b/tests/nukerg.c
@@ -284,7 +284,7 @@ static int fill_super_block(struct gfs2_sbd *sdp)
fprintf(stderr, "Failed to compute file system constants.\n");
return 1;
}
- if (read_sb(sdp) != 0) {
+ if (lgfs2_read_sb(sdp) != 0) {
perror("Failed to read superblock\n");
return 1;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.