|
|
9257a6 |
commit 0b04ce1ec5309002b5990e300c46a806421a8503
|
|
|
9257a6 |
Author: Andrew Price <anprice@redhat.com>
|
|
|
9257a6 |
Date: Tue Jun 4 17:16:18 2019 +0100
|
|
|
9257a6 |
|
|
|
9257a6 |
fsck.gfs2: Disambiguate 'check_data'
|
|
|
9257a6 |
|
|
|
9257a6 |
Having several functions with this name confuses profiling tools and
|
|
|
9257a6 |
makes reports difficult to read. Give the different check_data
|
|
|
9257a6 |
functions better names.
|
|
|
9257a6 |
|
|
|
9257a6 |
Signed-off-by: Andrew Price <anprice@redhat.com>
|
|
|
9257a6 |
|
|
|
9257a6 |
diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
|
|
|
9257a6 |
index 4d6dcfae..a334180f 100644
|
|
|
9257a6 |
--- a/gfs2/fsck/metawalk.c
|
|
|
9257a6 |
+++ b/gfs2/fsck/metawalk.c
|
|
|
9257a6 |
@@ -1390,7 +1390,7 @@ error_undo: /* undo what we've done so far for this block */
|
|
|
9257a6 |
* 1 if errors were found and corrected
|
|
|
9257a6 |
* 2 (ENOENT) is there were too many bad pointers
|
|
|
9257a6 |
*/
|
|
|
9257a6 |
-static int check_data(struct gfs2_inode *ip, struct metawalk_fxns *pass,
|
|
|
9257a6 |
+static int metawalk_check_data(struct gfs2_inode *ip, struct metawalk_fxns *pass,
|
|
|
9257a6 |
struct gfs2_buffer_head *bh, int head_size,
|
|
|
9257a6 |
uint64_t *blks_checked, struct error_block *error_blk)
|
|
|
9257a6 |
{
|
|
|
9257a6 |
@@ -1589,7 +1589,7 @@ int check_metatree(struct gfs2_inode *ip, struct metawalk_fxns *pass)
|
|
|
9257a6 |
continue;
|
|
|
9257a6 |
|
|
|
9257a6 |
if (pass->check_data)
|
|
|
9257a6 |
- error = check_data(ip, pass, bh, head_size,
|
|
|
9257a6 |
+ error = metawalk_check_data(ip, pass, bh, head_size,
|
|
|
9257a6 |
&blks_checked, &error_blk);
|
|
|
9257a6 |
if (pass->big_file_msg && ip->i_di.di_blocks > COMFORTABLE_BLKS)
|
|
|
9257a6 |
pass->big_file_msg(ip, blks_checked);
|
|
|
9257a6 |
diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c
|
|
|
9257a6 |
index 6f04109b..c7de3e39 100644
|
|
|
9257a6 |
--- a/gfs2/fsck/pass1.c
|
|
|
9257a6 |
+++ b/gfs2/fsck/pass1.c
|
|
|
9257a6 |
@@ -44,7 +44,7 @@ static int check_metalist(struct gfs2_inode *ip, uint64_t block,
|
|
|
9257a6 |
int *was_duplicate, void *private);
|
|
|
9257a6 |
static int undo_check_metalist(struct gfs2_inode *ip, uint64_t block,
|
|
|
9257a6 |
int h, void *private);
|
|
|
9257a6 |
-static int check_data(struct gfs2_inode *ip, uint64_t metablock,
|
|
|
9257a6 |
+static int pass1_check_data(struct gfs2_inode *ip, uint64_t metablock,
|
|
|
9257a6 |
uint64_t block, void *private,
|
|
|
9257a6 |
struct gfs2_buffer_head *bh, uint64_t *ptr);
|
|
|
9257a6 |
static int undo_check_data(struct gfs2_inode *ip, uint64_t block,
|
|
|
9257a6 |
@@ -192,7 +192,7 @@ struct metawalk_fxns pass1_fxns = {
|
|
|
9257a6 |
.private = NULL,
|
|
|
9257a6 |
.check_leaf = p1check_leaf,
|
|
|
9257a6 |
.check_metalist = check_metalist,
|
|
|
9257a6 |
- .check_data = check_data,
|
|
|
9257a6 |
+ .check_data = pass1_check_data,
|
|
|
9257a6 |
.check_eattr_indir = check_eattr_indir,
|
|
|
9257a6 |
.check_eattr_leaf = check_eattr_leaf,
|
|
|
9257a6 |
.check_dentry = NULL,
|
|
|
9257a6 |
@@ -542,7 +542,7 @@ out:
|
|
|
9257a6 |
return error;
|
|
|
9257a6 |
}
|
|
|
9257a6 |
|
|
|
9257a6 |
-static int check_data(struct gfs2_inode *ip, uint64_t metablock,
|
|
|
9257a6 |
+static int pass1_check_data(struct gfs2_inode *ip, uint64_t metablock,
|
|
|
9257a6 |
uint64_t block, void *private,
|
|
|
9257a6 |
struct gfs2_buffer_head *bbh, uint64_t *ptr)
|
|
|
9257a6 |
{
|