This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch andyp-sparse
in repository gfs2-utils.
commit d5e853c90bf3988ff28793abe76f4f9edae6f308
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Jun 11 14:01:12 2021 +0100
fsck.gfs2: Remove unused invalidate_fxns
Introduced in 00f523c4 "fsck.gfs2: invalidate invalid mode inodes"
Unused since 5e7c6711 "fsck.gfs2: Do not invalidate metablocks of
dinodes with invalid mode"
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/fsck/pass1.c | 101 ------------------------------------------------------
1 file changed, 101 deletions(-)
diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c
index d619a972..465cbceb 100644
--- a/gfs2/fsck/pass1.c
+++ b/gfs2/fsck/pass1.c
@@ -997,107 +997,6 @@ static int check_eattr_entries(struct gfs2_inode *ip,
return 0;
}
-/**
- * mark_block_invalid - mark blocks associated with an inode as invalid
- * unless the block is a duplicate.
- *
- * An "invalid" block is now considered free in the bitmap, and pass2 will
- * delete any invalid blocks. This is nearly identical to function
- * delete_block_if_notdup.
- */
-static int mark_block_invalid(struct gfs2_inode *ip, uint64_t block,
- enum dup_ref_type reftype, const char *btype,
- int *is_valid, int *was_duplicate)
-{
- int q;
-
- /* If the block isn't valid, we obviously can't invalidate it.
- * However, if we return an error, invalidating will stop, and
- * we want it to continue to invalidate the valid blocks. If we
- * don't do this, block references that follow that are also
- * referenced elsewhere (duplicates) won't be flagged as such,
- * and as a result, they'll be freed when this dinode is deleted,
- * despite being used by another dinode as a valid block. */
- if (is_valid)
- *is_valid = 1;
- if (was_duplicate)
- *was_duplicate = 0;
- if (!valid_block_ip(ip, block)) {
- if (is_valid)
- *is_valid = 0;
- return META_IS_GOOD;
- }
-
- q = block_type(bl, block);
- if (q != GFS2_BLKST_FREE) {
- if (was_duplicate)
- *was_duplicate = 1;
- add_duplicate_ref(ip, block, reftype, 0, INODE_INVALID);
- log_info(_("%s block %"PRIu64" (0x%"PRIx64"), part of inode
"
- "%"PRIu64" (0x%"PRIx64"), was previously referenced
so "
- "the invalid reference is ignored.\n"),
- btype, block, block, ip->i_num.in_addr, ip->i_num.in_addr);
- return META_IS_GOOD;
- }
- fsck_blockmap_set(ip, block, btype, GFS2_BLKST_UNLINKED);
- return META_IS_GOOD;
-}
-
-static int invalidate_metadata(struct iptr iptr, struct gfs2_buffer_head **bh, int h,
- int *is_valid, int *was_duplicate, void *private)
-{
- struct gfs2_inode *ip = iptr.ipt_ip;
- uint64_t block = iptr_block(iptr);
-
- *is_valid = 1;
- *was_duplicate = 0;
- return mark_block_invalid(ip, block, REF_AS_META, _("metadata"),
- is_valid, was_duplicate);
-}
-
-static int invalidate_leaf(struct gfs2_inode *ip, uint64_t block,
- void *private)
-{
- return mark_block_invalid(ip, block, REF_AS_META, _("leaf"),
- NULL, NULL);
-}
-
-static int invalidate_data(struct gfs2_inode *ip, uint64_t metablock,
- uint64_t block, void *private,
- struct gfs2_buffer_head *bh, __be64 *ptr)
-{
- return mark_block_invalid(ip, block, REF_AS_DATA, _("data"),
- NULL, NULL);
-}
-
-static int invalidate_eattr_indir(struct gfs2_inode *ip, uint64_t block,
- uint64_t parent,
- struct gfs2_buffer_head **bh, void *private)
-{
- return mark_block_invalid(ip, block, REF_AS_EA,
- _("indirect extended attribute"),
- NULL, NULL);
-}
-
-static int invalidate_eattr_leaf(struct gfs2_inode *ip, uint64_t block,
- uint64_t parent, struct gfs2_buffer_head **bh,
- void *private)
-{
- return mark_block_invalid(ip, block, REF_AS_EA,
- _("extended attribute"),
- NULL, NULL);
-}
-
-static struct metawalk_fxns invalidate_fxns = {
- .private = NULL,
- .check_metalist = invalidate_metadata,
- .check_data = invalidate_data,
- .check_leaf = invalidate_leaf,
- .check_eattr_indir = invalidate_eattr_indir,
- .check_eattr_leaf = invalidate_eattr_leaf,
- .delete_block = delete_block,
-};
-
/**
* Check for massive amounts of pointer corruption. If the block has
* lots of out-of-range pointers, we can't trust any of the pointers.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.