From: Andrew Price Date: Thu, 6 Aug 2020 14:38:05 +0100 Subject: [Cluster-devel] [PATCH 30/32] savemeta: Remove some unnecessary jindex reading code In-Reply-To: <20200806133807.111280-1-anprice@redhat.com> References: <20200806133807.111280-1-anprice@redhat.com> Message-ID: <20200806133807.111280-31-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 This section reads the jindex and walks its tree but the data it gathers is not used subsequently. The jindex and journals will be picked up by the bitmap walk later. Signed-off-by: Andrew Price --- gfs2/edit/savemeta.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c index 272f796c..fe7a6d78 100644 --- a/gfs2/edit/savemeta.c +++ b/gfs2/edit/savemeta.c @@ -1073,8 +1073,6 @@ static int parse_header(char *buf, struct savemeta_header *smh) void savemeta(char *out_fn, int saveoption, int gziplevel) { - uint64_t jindex_block; - struct gfs2_buffer_head *lbh; struct metafd mfd; struct osi_node *n; uint64_t sb_addr; @@ -1090,15 +1088,6 @@ void savemeta(char *out_fn, int saveoption, int gziplevel) sbd.bsize = sbd.sd_sb.sb_bsize; printf("There are %llu blocks of %u bytes in the filesystem.\n", (unsigned long long)sbd.fssize, sbd.bsize); - if (sbd.gfs1) - jindex_block = sbd1->sb_jindex_di.no_addr; - else - jindex_block = masterblock("jindex"); - lbh = bread(&sbd, jindex_block); - gfs2_dinode_in(&di, lbh->b_data); - if (!sbd.gfs1) - do_dinode_extended(&di, lbh->b_data); - brelse(lbh); printf("Filesystem size: %.2fGB\n", (sbd.fssize * sbd.bsize) / ((float)(1 << 30))); get_journal_inode_blocks(); -- 2.26.2