From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 6/6] fsck.gfs2: fix_hashtable: Decrement i_blocks when freeing leaf blocks
Date: Mon, 30 Jan 2023 15:21:46 +0000 [thread overview]
Message-ID: <20230130152146.633484-7-anprice@redhat.com> (raw)
In-Reply-To: <20230130152146.633484-1-anprice@redhat.com>
fsck.gfs2 can leave i_blocks too large when it removes empty leaf
blocks, so decrease the count when freeing them.
Signed-off-by: Andrew Price <anprice@redhat.com>
---
gfs2/fsck/pass2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c
index 5327ee43..71459978 100644
--- a/gfs2/fsck/pass2.c
+++ b/gfs2/fsck/pass2.c
@@ -1334,6 +1334,7 @@ static int fix_hashtable(struct fsck_cx *cx, struct lgfs2_inode *ip, __be64 *tbl
(dentry.dr_inum.in_formal_ino == 0)) {
lgfs2_brelse(lbh);
lgfs2_free_block(ip->i_sbd, leafblk);
+ ip->i_blocks--;
log_err(_("Out of place leaf block %"PRIu64" (0x%"PRIx64") had no "
"entries, so it was deleted.\n"),
leafblk, leafblk);
--
2.39.0
prev parent reply other threads:[~2023-01-30 15:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 15:21 [Cluster-devel] [PATCH 0/6] gfs2-utils: Cleanups and fsck.gfs2 fixes Andrew Price
2023-01-30 15:21 ` [Cluster-devel] [PATCH 1/6] libgfs2: Return the inode from lgfs2_lookupi() Andrew Price
2023-01-30 15:21 ` [Cluster-devel] [PATCH 2/6] libgfs2: Remove lgfs2_gfs_createi() Andrew Price
2023-01-30 15:21 ` [Cluster-devel] [PATCH 3/6] libgfs2: Reorganise lgfs2_createi() Andrew Price
2023-01-30 15:21 ` [Cluster-devel] [PATCH 4/6] fsck.gfs2: Remove de variable from dirref_find() Andrew Price
2023-01-30 15:21 ` [Cluster-devel] [PATCH 5/6] fsck.gfs2: Fix wrong entry used in dentry comparison Andrew Price
2023-01-30 15:21 ` Andrew Price [this message]
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=20230130152146.633484-7-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).