This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch andyp-fsck_cx
in repository gfs2-utils.
commit f5f93c664103cdb4b0692ce34e3dbebce81b555d
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Jul 29 17:57:42 2022 +0100
fsck.gfs2: Don't define names in the gfs2_ namespace
It's more consistent and less confusing to only have gfs2_* symbols
defined in gfs2_ondisk.h
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/fsck/block_list.c | 8 ++++----
gfs2/fsck/fs_recovery.c | 20 +++++++++---------
gfs2/fsck/fsck.h | 12 +++++------
gfs2/fsck/initialize.c | 16 +++++++--------
gfs2/fsck/link.c | 6 +++---
gfs2/fsck/link.h | 6 +++---
gfs2/fsck/main.c | 4 ++--
gfs2/fsck/metawalk.c | 2 +-
gfs2/fsck/pass1.c | 54 ++++++++++++++++++++++++-------------------------
gfs2/fsck/pass5.c | 6 +++---
gfs2/fsck/rgrepair.c | 8 ++++----
gfs2/fsck/util.c | 12 +++++------
gfs2/fsck/util.h | 8 ++++----
13 files changed, 81 insertions(+), 81 deletions(-)
diff --git a/gfs2/fsck/block_list.c b/gfs2/fsck/block_list.c
index 0dca95fe..65c55a1c 100644
--- a/gfs2/fsck/block_list.c
+++ b/gfs2/fsck/block_list.c
@@ -10,7 +10,7 @@
#include "fsck.h"
-void gfs2_special_free(struct special_blocks *blist)
+void special_free(struct special_blocks *blist)
{
struct special_blocks *f;
@@ -36,7 +36,7 @@ struct special_blocks *blockfind(struct special_blocks *blist, uint64_t
num)
return NULL;
}
-static void gfs2_special_add(struct special_blocks *blocklist, uint64_t block)
+static void special_add(struct special_blocks *blocklist, uint64_t block)
{
struct special_blocks *b;
@@ -48,9 +48,9 @@ static void gfs2_special_add(struct special_blocks *blocklist, uint64_t
block)
}
}
-void gfs2_special_set(struct special_blocks *blocklist, uint64_t block)
+void special_set(struct special_blocks *blocklist, uint64_t block)
{
if (blockfind(blocklist, block))
return;
- gfs2_special_add(blocklist, block);
+ special_add(blocklist, block);
}
diff --git a/gfs2/fsck/fs_recovery.c b/gfs2/fsck/fs_recovery.c
index 607ef9c2..94de748c 100644
--- a/gfs2/fsck/fs_recovery.c
+++ b/gfs2/fsck/fs_recovery.c
@@ -27,7 +27,7 @@ static unsigned int sd_found_revokes = 0;
static osi_list_t sd_revoke_list;
static unsigned int sd_replay_tail;
-struct gfs2_revoke_replay {
+struct revoke_replay {
osi_list_t rr_list;
uint64_t rr_blkno;
unsigned int rr_where;
@@ -36,11 +36,11 @@ struct gfs2_revoke_replay {
static int revoke_add(struct lgfs2_sbd *sdp, uint64_t blkno, unsigned int where)
{
osi_list_t *tmp, *head = &sd_revoke_list;
- struct gfs2_revoke_replay *rr;
+ struct revoke_replay *rr;
int found = 0;
osi_list_foreach(tmp, head) {
- rr = osi_list_entry(tmp, struct gfs2_revoke_replay, rr_list);
+ rr = osi_list_entry(tmp, struct revoke_replay, rr_list);
if (rr->rr_blkno == blkno) {
found = 1;
break;
@@ -52,7 +52,7 @@ static int revoke_add(struct lgfs2_sbd *sdp, uint64_t blkno, unsigned
int where)
return 0;
}
- rr = malloc(sizeof(struct gfs2_revoke_replay));
+ rr = malloc(sizeof(struct revoke_replay));
if (!rr)
return -ENOMEM;
@@ -65,12 +65,12 @@ static int revoke_add(struct lgfs2_sbd *sdp, uint64_t blkno, unsigned
int where)
static int revoke_check(struct lgfs2_sbd *sdp, uint64_t blkno, unsigned int where)
{
osi_list_t *tmp;
- struct gfs2_revoke_replay *rr;
+ struct revoke_replay *rr;
int wrap, a, b;
int found = 0;
osi_list_foreach(tmp, &sd_revoke_list) {
- rr = osi_list_entry(tmp, struct gfs2_revoke_replay, rr_list);
+ rr = osi_list_entry(tmp, struct revoke_replay, rr_list);
if (rr->rr_blkno == blkno) {
found = 1;
break;
@@ -89,10 +89,10 @@ static int revoke_check(struct lgfs2_sbd *sdp, uint64_t blkno,
unsigned int wher
static void revoke_clean(struct lgfs2_sbd *sdp)
{
osi_list_t *head = &sd_revoke_list;
- struct gfs2_revoke_replay *rr;
+ struct revoke_replay *rr;
while (!osi_list_empty(head)) {
- rr = osi_list_entry(head->next, struct gfs2_revoke_replay, rr_list);
+ rr = osi_list_entry(head->next, struct revoke_replay, rr_list);
osi_list_del(&rr->rr_list);
free(rr);
}
@@ -476,7 +476,7 @@ int preen_is_safe(struct lgfs2_sbd *sdp, int preen, int force_check)
* Returns: errno
*/
-static int gfs2_recover_journal(struct lgfs2_inode *ip, int j, int preen,
+static int recover_journal(struct lgfs2_inode *ip, int j, int preen,
int force_check, int *was_clean)
{
struct lgfs2_sbd *sdp = ip->i_sbd;
@@ -711,7 +711,7 @@ int replay_journals(struct fsck_cx *cx, int preen, int force_check,
if (sdp->jsize == LGFS2_DEFAULT_JSIZE && jsize &&
jsize != sdp->jsize)
sdp->jsize = jsize;
- error = gfs2_recover_journal(sdp->md.journal[i], i,
+ error = recover_journal(sdp->md.journal[i], i,
preen, force_check,
&clean);
if (!clean)
diff --git a/gfs2/fsck/fsck.h b/gfs2/fsck/fsck.h
index 382abfab..1d7af191 100644
--- a/gfs2/fsck/fsck.h
+++ b/gfs2/fsck/fsck.h
@@ -27,7 +27,7 @@
#define BAD_POINTER_TOLERANCE 10 /* How many bad pointers is too many? */
-struct gfs2_bmap {
+struct bmap {
uint64_t size;
uint64_t mapsize;
unsigned char *map;
@@ -126,7 +126,7 @@ extern int pass1c(struct fsck_cx *cx);
extern int pass2(struct fsck_cx *cx);
extern int pass3(struct fsck_cx *cx);
extern int pass4(struct fsck_cx *cx);
-extern int pass5(struct fsck_cx *cx, struct gfs2_bmap *bl);
+extern int pass5(struct fsck_cx *cx, struct bmap *bl);
extern int rindex_repair(struct fsck_cx *cx, int trust_lvl, int *ok);
extern int fsck_query(const char *format, ...)
__attribute__((format(printf,1,2)));
@@ -138,14 +138,14 @@ extern void dirtree_delete(struct dir_info *b);
* of pass1 and put somewhere else... */
struct dir_info *dirtree_insert(struct lgfs2_inum inum);
-struct gfs2_options {
+struct fsck_options {
char *device;
unsigned int yes:1;
unsigned int no:1;
unsigned int query:1;
};
-extern struct gfs2_options opts;
+extern struct fsck_options opts;
extern struct lgfs2_inode *lf_dip; /* Lost and found directory inode */
extern int lf_was_created;
extern uint64_t last_fs_block, last_reported_block;
@@ -200,8 +200,8 @@ struct special_blocks {
};
extern struct special_blocks *blockfind(struct special_blocks *blist, uint64_t num);
-extern void gfs2_special_set(struct special_blocks *blocklist, uint64_t block);
-extern void gfs2_special_free(struct special_blocks *blist);
+extern void special_set(struct special_blocks *blocklist, uint64_t block);
+extern void special_free(struct special_blocks *blist);
extern int sb_fixed;
extern int build_per_node(struct lgfs2_sbd *sdp);
diff --git a/gfs2/fsck/initialize.c b/gfs2/fsck/initialize.c
index 9d771a70..b32cfa5a 100644
--- a/gfs2/fsck/initialize.c
+++ b/gfs2/fsck/initialize.c
@@ -67,7 +67,7 @@ static int block_mounters(struct lgfs2_sbd *sdp, int block_em)
return 0;
}
-static void gfs2_dup_free(void)
+static void dup_free(void)
{
struct osi_node *n;
struct duptree *dt;
@@ -78,7 +78,7 @@ static void gfs2_dup_free(void)
}
}
-static void gfs2_dirtree_free(void)
+static void dirtree_free(void)
{
struct osi_node *n;
struct dir_info *dt;
@@ -89,7 +89,7 @@ static void gfs2_dirtree_free(void)
}
}
-static void gfs2_inodetree_free(void)
+static void inodetree_free(void)
{
struct osi_node *n;
struct inode_info *dt;
@@ -114,9 +114,9 @@ static void empty_super_block(struct lgfs2_sbd *sdp)
log_info( _("Freeing buffers.\n"));
lgfs2_rgrp_free(sdp, &sdp->rgtree);
- gfs2_inodetree_free();
- gfs2_dirtree_free();
- gfs2_dup_free();
+ inodetree_free();
+ dirtree_free();
+ dup_free();
}
@@ -625,7 +625,7 @@ static void lookup_per_node(struct lgfs2_sbd *sdp, int allow_rebuild)
#define RA_WINDOW 32
-static unsigned gfs2_rgrp_reada(struct lgfs2_sbd *sdp, unsigned cur_window,
+static unsigned rgrp_reada(struct lgfs2_sbd *sdp, unsigned cur_window,
struct osi_node *n)
{
struct lgfs2_rgrp_tree *rgd;
@@ -673,7 +673,7 @@ static int read_rgrps(struct lgfs2_sbd *sdp, uint64_t expected)
rgd = (struct lgfs2_rgrp_tree *)n;
/* Readahead resource group headers */
if (ra_window < RA_WINDOW/2)
- ra_window = gfs2_rgrp_reada(sdp, ra_window, n);
+ ra_window = rgrp_reada(sdp, ra_window, n);
/* Read resource group header */
errblock = lgfs2_rgrp_read(sdp, rgd);
if (errblock)
diff --git a/gfs2/fsck/link.c b/gfs2/fsck/link.c
index 32893da5..8c377787 100644
--- a/gfs2/fsck/link.c
+++ b/gfs2/fsck/link.c
@@ -15,10 +15,10 @@
#include "link.h"
#include "util.h"
-struct gfs2_bmap nlink1map = { 0 }; /* map of dinodes with nlink == 1 */
-struct gfs2_bmap clink1map = { 0 }; /* map of dinodes w/counted links == 1 */
+struct bmap nlink1map = { 0 }; /* map of dinodes with nlink == 1 */
+struct bmap clink1map = { 0 }; /* map of dinodes w/counted links == 1 */
-int link1_set(struct gfs2_bmap *bmap, uint64_t bblock, int mark)
+int link1_set(struct bmap *bmap, uint64_t bblock, int mark)
{
static unsigned char *byte;
static uint64_t b;
diff --git a/gfs2/fsck/link.h b/gfs2/fsck/link.h
index cd73deba..68723ae6 100644
--- a/gfs2/fsck/link.h
+++ b/gfs2/fsck/link.h
@@ -1,8 +1,8 @@
#ifndef _LINK_H
#define _LINK_H
-extern struct gfs2_bmap nlink1map; /* map of dinodes with nlink == 1 */
-extern struct gfs2_bmap clink1map; /* map of dinodes w/counted links == 1 */
+extern struct bmap nlink1map; /* map of dinodes with nlink == 1 */
+extern struct bmap clink1map; /* map of dinodes w/counted links == 1 */
enum {
INCR_LINK_BAD = -1,
@@ -11,7 +11,7 @@ enum {
INCR_LINK_CHECK_ORIG = 2,
};
-int link1_set(struct gfs2_bmap *bmap, uint64_t bblock, int mark);
+int link1_set(struct bmap *bmap, uint64_t bblock, int mark);
int set_di_nlink(struct lgfs2_inode *ip);
int incr_link_count(struct lgfs2_inum no, struct lgfs2_inode *ip, const char *why);
int decr_link_count(uint64_t inode_no, uint64_t referenced_from, int gfs1,
diff --git a/gfs2/fsck/main.c b/gfs2/fsck/main.c
index fff0d32d..bd6563a0 100644
--- a/gfs2/fsck/main.c
+++ b/gfs2/fsck/main.c
@@ -25,7 +25,7 @@
#include "metawalk.h"
#include "util.h"
-struct gfs2_options opts = {0};
+struct fsck_options opts = {0};
struct lgfs2_inode *lf_dip = NULL; /* Lost and found directory inode */
int lf_was_created = 0;
uint64_t last_fs_block, last_reported_block = -1;
@@ -57,7 +57,7 @@ static void version(void)
printf(REDHAT_COPYRIGHT "\n");
}
-static int read_cmdline(int argc, char **argv, struct gfs2_options *gopts)
+static int read_cmdline(int argc, char **argv, struct fsck_options *gopts)
{
int c;
diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index 36f4abcb..abdbb95f 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -25,7 +25,7 @@
/* There are two bitmaps: (1) The "blockmap" that fsck uses to keep track of
what block type has been discovered, and (2) The rgrp bitmap. Function
- gfs2_blockmap_set is used to set the former and gfs2_set_bitmap
+ blockmap_set is used to set the former and gfs2_set_bitmap
is used to set the latter. The two must be kept in sync, otherwise
you'll get bitmap mismatches. This function checks the status of the
bitmap whenever the blockmap changes, and fixes it accordingly. */
diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c
index 44199ac6..fd7a279e 100644
--- a/gfs2/fsck/pass1.c
+++ b/gfs2/fsck/pass1.c
@@ -30,7 +30,7 @@
#include "fs_recovery.h"
static struct special_blocks gfs1_rindex_blks;
-static struct gfs2_bmap *bl = NULL;
+static struct bmap *bl = NULL;
static struct metawalk_fxns pass1_fxns;
struct block_count {
@@ -39,7 +39,7 @@ struct block_count {
uint64_t ea_count;
};
-static int gfs2_blockmap_set(struct gfs2_bmap *bmap, uint64_t bblock, int mark)
+static int blockmap_set(struct bmap *bmap, uint64_t bblock, int mark)
{
static unsigned char *byte;
static uint64_t b;
@@ -69,7 +69,7 @@ static int _fsck_blockmap_set(struct lgfs2_inode *ip, uint64_t bblock,
if (error)
return error;
- return gfs2_blockmap_set(bl, bblock, mark);
+ return blockmap_set(bl, bblock, mark);
}
#define fsck_blockmap_set(ip, b, bt, m) \
@@ -536,7 +536,7 @@ static int p1_check_data(struct fsck_cx *cx, struct lgfs2_inode *ip,
uint64_t me
if (ip->i_sbd->gfs1 && ip == ip->i_sbd->md.riinode) {
log_info(_("Block %"PRIu64" (0x%"PRIx64") is a GFS1 rindex
block\n"),
block, block);
- gfs2_special_set(&gfs1_rindex_blks, block);
+ special_set(&gfs1_rindex_blks, block);
fsck_blockmap_set(ip, block, "rgrp", GFS2_BLKST_DINODE);
} else if (ip->i_sbd->gfs1 && ip->i_flags & GFS2_DIF_JDATA) {
log_info(_("Block %"PRIu64" (0x%"PRIx64") is a GFS1 journaled
data block\n"),
@@ -1115,7 +1115,7 @@ static int alloc_metalist(struct fsck_cx *cx, struct iptr iptr,
struct lgfs2_buf
if (q == GFS2_BLKST_FREE) {
log_debug(_("%s reference to new metadata block %"PRIu64"
(0x%"PRIx64") is now marked as indirect.\n"),
desc, block, block);
- gfs2_blockmap_set(bl, block, ip->i_sbd->gfs1 ?
+ blockmap_set(bl, block, ip->i_sbd->gfs1 ?
GFS2_BLKST_DINODE : GFS2_BLKST_USED);
}
return META_IS_GOOD;
@@ -1135,7 +1135,7 @@ static int alloc_data(struct fsck_cx *cx, struct lgfs2_inode *ip,
uint64_t metab
if (q == GFS2_BLKST_FREE) {
log_debug(_("%s reference to new data block %"PRIu64"
(0x%"PRIx64") is now marked as data.\n"),
desc, block, block);
- gfs2_blockmap_set(bl, block, GFS2_BLKST_USED);
+ blockmap_set(bl, block, GFS2_BLKST_USED);
}
return 0;
}
@@ -1184,7 +1184,7 @@ static int pass1_check_metatree(struct fsck_cx *cx, struct
lgfs2_inode *ip,
error = check_metatree(cx, ip, pass);
if (error)
- gfs2_blockmap_set(bl, ip->i_num.in_addr, GFS2_BLKST_FREE);
+ blockmap_set(bl, ip->i_num.in_addr, GFS2_BLKST_FREE);
return error;
}
@@ -1409,7 +1409,7 @@ static int check_system_inode(struct fsck_cx *cx,
if (lgfs2_check_meta((*sysinode)->i_bh->b_data, GFS2_METATYPE_DI)) {
log_err(_("Found invalid system dinode at block %"PRIu64"
(0x%"PRIx64")\n"),
iblock, iblock);
- gfs2_blockmap_set(bl, iblock, GFS2_BLKST_FREE);
+ blockmap_set(bl, iblock, GFS2_BLKST_FREE);
check_n_fix_bitmap(cx->sdp, (*sysinode)->i_rgd, iblock, 0,
GFS2_BLKST_FREE);
lgfs2_inode_put(sysinode);
@@ -1445,7 +1445,7 @@ static int check_system_inode(struct fsck_cx *cx,
/* Set the blockmap (but not bitmap) back to
'free' so that it gets checked like any
normal dinode. */
- gfs2_blockmap_set(bl, iblock, GFS2_BLKST_FREE);
+ blockmap_set(bl, iblock, GFS2_BLKST_FREE);
log_err( _("Removed system inode \"%s\".\n"),
filename);
}
@@ -1731,7 +1731,7 @@ static int pass1_process_bitmap(struct fsck_cx *cx, struct
lgfs2_rgrp_tree *rgd,
display_progress(block);
if (fsck_abort) { /* if asked to abort */
- gfs2_special_free(&gfs1_rindex_blks);
+ special_free(&gfs1_rindex_blks);
return FSCK_OK;
}
if (skip_this_pass) {
@@ -1806,7 +1806,7 @@ static int pass1_process_bitmap(struct fsck_cx *cx, struct
lgfs2_rgrp_tree *rgd,
} else if (handle_di(cx, rgd, bh) < 0) {
stack;
lgfs2_brelse(bh);
- gfs2_special_free(&gfs1_rindex_blks);
+ special_free(&gfs1_rindex_blks);
return FSCK_ERROR;
}
/* Ignore everything else - they should be hit by the
@@ -1852,7 +1852,7 @@ static int pass1_process_rgrp(struct fsck_cx *cx, struct
lgfs2_rgrp_tree *rgd)
n = lgfs2_bm_scan(rgd, k, ibuf, GFS2_BLKST_UNLINKED);
for (i = 0; i < n; i++) {
- gfs2_blockmap_set(bl, ibuf[i], GFS2_BLKST_UNLINKED);
+ blockmap_set(bl, ibuf[i], GFS2_BLKST_UNLINKED);
if (fsck_abort)
goto out;
}
@@ -1863,7 +1863,7 @@ out:
return ret;
}
-static int gfs2_blockmap_create(struct gfs2_bmap *bmap, uint64_t size)
+static int blockmap_create(struct bmap *bmap, uint64_t size)
{
bmap->size = size;
@@ -1877,7 +1877,7 @@ static int gfs2_blockmap_create(struct gfs2_bmap *bmap, uint64_t
size)
}
-static int link1_create(struct gfs2_bmap *bmap, uint64_t size)
+static int link1_create(struct bmap *bmap, uint64_t size)
{
bmap->size = size;
@@ -1890,17 +1890,17 @@ static int link1_create(struct gfs2_bmap *bmap, uint64_t size)
return 0;
}
-static struct gfs2_bmap *gfs2_bmap_create(struct lgfs2_sbd *sdp, uint64_t size,
+static struct bmap *bmap_create(struct lgfs2_sbd *sdp, uint64_t size,
uint64_t *addl_mem_needed)
{
- struct gfs2_bmap *il;
+ struct bmap *il;
*addl_mem_needed = 0L;
il = calloc(1, sizeof(*il));
if (!il)
return NULL;
- if (gfs2_blockmap_create(il, size)) {
+ if (blockmap_create(il, size)) {
*addl_mem_needed = il->mapsize;
free(il);
il = NULL;
@@ -1908,7 +1908,7 @@ static struct gfs2_bmap *gfs2_bmap_create(struct lgfs2_sbd *sdp,
uint64_t size,
return il;
}
-static void gfs2_blockmap_destroy(struct gfs2_bmap *bmap)
+static void blockmap_destroy(struct bmap *bmap)
{
if (bmap->map)
free(bmap->map);
@@ -1916,10 +1916,10 @@ static void gfs2_blockmap_destroy(struct gfs2_bmap *bmap)
bmap->mapsize = 0;
}
-static void *gfs2_bmap_destroy(struct lgfs2_sbd *sdp, struct gfs2_bmap *il)
+static void *bmap_destroy(struct lgfs2_sbd *sdp, struct bmap *il)
{
if (il) {
- gfs2_blockmap_destroy(il);
+ blockmap_destroy(il);
free(il);
il = NULL;
}
@@ -1958,7 +1958,7 @@ int pass1(struct fsck_cx *cx)
int ret = FSCK_OK;
uint64_t addl_mem_needed;
- bl = gfs2_bmap_create(sdp, last_fs_block+1, &addl_mem_needed);
+ bl = bmap_create(sdp, last_fs_block+1, &addl_mem_needed);
if (!bl) {
enomem(addl_mem_needed);
return FSCK_ERROR;
@@ -1966,14 +1966,14 @@ int pass1(struct fsck_cx *cx)
addl_mem_needed = link1_create(&nlink1map, last_fs_block+1);
if (addl_mem_needed) {
enomem(addl_mem_needed);
- gfs2_bmap_destroy(sdp, bl);
+ bmap_destroy(sdp, bl);
return FSCK_ERROR;
}
addl_mem_needed = link1_create(&clink1map, last_fs_block+1);
if (addl_mem_needed) {
enomem(addl_mem_needed);
link1_destroy(&nlink1map);
- gfs2_bmap_destroy(sdp, bl);
+ bmap_destroy(sdp, bl);
return FSCK_ERROR;
}
osi_list_init(&gfs1_rindex_blks.list);
@@ -2007,9 +2007,9 @@ int pass1(struct fsck_cx *cx)
for (i = 0; i < rgd->rt_length; i++) {
log_debug("rgrp block %"PRIu64" (0x%"PRIx64") is now marked
as 'rgrp data'\n",
rgd->rt_addr + i, rgd->rt_addr + i);
- if (gfs2_blockmap_set(bl, rgd->rt_addr + i, GFS2_BLKST_USED)) {
+ if (blockmap_set(bl, rgd->rt_addr + i, GFS2_BLKST_USED)) {
stack;
- gfs2_special_free(&gfs1_rindex_blks);
+ special_free(&gfs1_rindex_blks);
ret = FSCK_ERROR;
goto out;
}
@@ -2028,9 +2028,9 @@ int pass1(struct fsck_cx *cx)
pass5(cx, bl);
print_pass_duration("reconcile_bitmaps", &timer);
out:
- gfs2_special_free(&gfs1_rindex_blks);
+ special_free(&gfs1_rindex_blks);
if (bl)
- gfs2_bmap_destroy(sdp, bl);
+ bmap_destroy(sdp, bl);
return ret;
}
diff --git a/gfs2/fsck/pass5.c b/gfs2/fsck/pass5.c
index e464fdff..7c8dfce5 100644
--- a/gfs2/fsck/pass5.c
+++ b/gfs2/fsck/pass5.c
@@ -14,7 +14,7 @@
#define GFS1_BLKST_USEDMETA 4
-static int check_block_status(struct lgfs2_sbd *sdp, struct gfs2_bmap *bl,
+static int check_block_status(struct lgfs2_sbd *sdp, struct bmap *bl,
char *buffer, unsigned int buflen,
uint64_t *rg_block, uint64_t rg_data,
uint32_t *count)
@@ -114,7 +114,7 @@ static int check_block_status(struct lgfs2_sbd *sdp, struct gfs2_bmap
*bl,
}
static void update_rgrp(struct lgfs2_sbd *sdp, struct lgfs2_rgrp_tree *rgp,
- struct gfs2_bmap *bl, uint32_t *count)
+ struct bmap *bl, uint32_t *count)
{
uint32_t i;
struct lgfs2_bitmap *bits;
@@ -194,7 +194,7 @@ static void update_rgrp(struct lgfs2_sbd *sdp, struct lgfs2_rgrp_tree
*rgp,
* fix free block maps
* fix used inode maps
*/
-int pass5(struct fsck_cx *cx, struct gfs2_bmap *bl)
+int pass5(struct fsck_cx *cx, struct bmap *bl)
{
struct lgfs2_sbd *sdp = cx->sdp;
struct osi_node *n, *next = NULL;
diff --git a/gfs2/fsck/rgrepair.c b/gfs2/fsck/rgrepair.c
index 8ce1a32d..5f228500 100644
--- a/gfs2/fsck/rgrepair.c
+++ b/gfs2/fsck/rgrepair.c
@@ -71,7 +71,7 @@ static void find_journaled_rgs(struct lgfs2_sbd *sdp)
if (!lgfs2_check_meta(bh->b_data, GFS2_METATYPE_RG)) {
/* False rgrp found at block dblock */
false_count++;
- gfs2_special_set(&false_rgrps, dblock);
+ special_set(&false_rgrps, dblock);
}
lgfs2_brelse(bh);
}
@@ -249,7 +249,7 @@ static int find_shortest_rgdist(struct lgfs2_sbd *sdp, uint64_t
*dist_array,
log_debug(_("Adjusted first rgrp distance: 0x%"PRIx64"\n"),
*dist_array);
} /* if first RG distance is within tolerance */
- gfs2_special_free(&false_rgrps);
+ special_free(&false_rgrps);
return gsegment;
}
@@ -805,7 +805,7 @@ static int calc_rgrps(struct lgfs2_sbd *sdp)
* Sets: sdp->rglist to a linked list of fsck_rgrp structs representing
* what we think the rindex should really look like.
*/
-static int gfs2_rindex_calculate(struct lgfs2_sbd *sdp, int *num_rgs)
+static int rindex_calculate(struct lgfs2_sbd *sdp, int *num_rgs)
{
uint64_t num_rgrps = 0;
@@ -973,7 +973,7 @@ int rindex_repair(struct fsck_cx *cx, int trust_lvl, int *ok)
lgfs2_rgrp_free(sdp, &sdp->rgtree);
/* Calculate our own RG index for comparison */
- error = gfs2_rindex_calculate(sdp, &calc_rg_count);
+ error = rindex_calculate(sdp, &calc_rg_count);
if (error) { /* If calculated RGs don't match the fs */
lgfs2_rgrp_free(sdp, &rgcalc);
return -1;
diff --git a/gfs2/fsck/util.c b/gfs2/fsck/util.c
index 5dafcf9e..3c1b7116 100644
--- a/gfs2/fsck/util.c
+++ b/gfs2/fsck/util.c
@@ -83,7 +83,7 @@ void display_progress(uint64_t block)
}
}
-char gfs2_getch(void)
+char fsck_getch(void)
{
struct termios termattr, savetermattr;
char ch;
@@ -145,7 +145,7 @@ char generic_interrupt(const char *caller, const char *where,
/* Make sure query is printed out */
fflush(NULL);
- response = gfs2_getch();
+ response = fsck_getch();
printf("\n");
fflush(NULL);
if (strchr(answers, response))
@@ -183,7 +183,7 @@ int fsck_query(const char *format, ...)
/* Make sure query is printed out */
fflush(NULL);
- response = gfs2_getch();
+ response = fsck_getch();
printf("\n");
fflush(NULL);
@@ -217,14 +217,14 @@ int fsck_query(const char *format, ...)
}
/*
- * gfs2_dup_set - Flag a block as a duplicate
+ * dup_set - Flag a block as a duplicate
* We keep the references in a red/black tree. We can't keep track of every
* single inode in the file system, so the first time this function is called
* will actually be for the second reference to the duplicated block.
* This will return the number of references to the block.
*
* create - will be set if the call is supposed to create the reference. */
-static struct duptree *gfs2_dup_set(uint64_t dblock, int create)
+static struct duptree *dup_set(uint64_t dblock, int create)
{
struct osi_node **newn = &dup_blocks.osi_node, *parent = NULL;
struct duptree *dt;
@@ -334,7 +334,7 @@ int add_duplicate_ref(struct lgfs2_inode *ip, uint64_t block,
/* If this is not the first reference (i.e. all calls from pass1) we
need to create the duplicate reference. If this is pass1b, we want
to ignore references that aren't found. */
- dt = gfs2_dup_set(block, !first);
+ dt = dup_set(block, !first);
if (!dt) /* If this isn't a duplicate */
return META_IS_GOOD;
diff --git a/gfs2/fsck/util.h b/gfs2/fsck/util.h
index 5742f96f..0eb050e5 100644
--- a/gfs2/fsck/util.h
+++ b/gfs2/fsck/util.h
@@ -32,7 +32,7 @@ struct fsck_pass {
int (*f)(struct fsck_cx *cx);
};
-static inline int block_type(struct gfs2_bmap *bl, uint64_t bblock)
+static inline int block_type(struct bmap *bl, uint64_t bblock)
{
static unsigned char *byte;
static uint64_t b;
@@ -44,7 +44,7 @@ static inline int block_type(struct gfs2_bmap *bl, uint64_t bblock)
return btype;
}
-static inline int link1_type(struct gfs2_bmap *bl, uint64_t bblock)
+static inline int link1_type(struct bmap *bl, uint64_t bblock)
{
static unsigned char *byte;
static uint64_t b;
@@ -56,7 +56,7 @@ static inline int link1_type(struct gfs2_bmap *bl, uint64_t bblock)
return btype;
}
-static inline void link1_destroy(struct gfs2_bmap *bmap)
+static inline void link1_destroy(struct bmap *bmap)
{
if (bmap->map)
free(bmap->map);
@@ -123,7 +123,7 @@ extern enum dup_ref_type get_ref_type(struct inode_with_dups *id);
extern char generic_interrupt(const char *caller, const char *where,
const char *progress, const char *question,
const char *answers);
-extern char gfs2_getch(void);
+extern char fsck_getch(void);
extern uint64_t find_free_blk(struct lgfs2_sbd *sdp);
extern __be64 *get_dir_hash(struct lgfs2_inode *ip);
extern void delete_all_dups(struct lgfs2_inode *ip);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.