From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Price Date: Mon, 30 Jan 2023 15:21:46 +0000 Subject: [Cluster-devel] [PATCH 6/6] fsck.gfs2: fix_hashtable: Decrement i_blocks when freeing leaf blocks In-Reply-To: <20230130152146.633484-1-anprice@redhat.com> References: <20230130152146.633484-1-anprice@redhat.com> Message-ID: <20230130152146.633484-7-anprice@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- 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