From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [gfs2-utils PATCH 3/7] fsck.gfs2: Don't set gfs1rg pointer unless we need to
Date: Wed, 22 Jun 2016 14:26:48 -0500 [thread overview]
Message-ID: <4f9e3a6f5bcf20a47f3eaf494d289da03a95b50c.1466623303.git.rpeterso@redhat.com> (raw)
In-Reply-To: <cover.1466623302.git.rpeterso@redhat.com>
This patch simply delays setting the gfs1rg pointer until later
in function check_n_fix_bitmap, making it a bit faster.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
gfs2/fsck/metawalk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index cda59ac..651bd79 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -49,8 +49,6 @@ int check_n_fix_bitmap(struct gfs2_sbd *sdp, struct rgrp_tree *rgd,
prevrgd = rgd;
}
- gfs1rg = (struct gfs_rgrp *)&rgd->rg;
-
old_state = lgfs2_get_bitmap(sdp, blk, rgd);
if (old_state < 0) {
log_err( _("Block %llu (0x%llx) is not represented in the "
@@ -93,6 +91,8 @@ int check_n_fix_bitmap(struct gfs2_sbd *sdp, struct rgrp_tree *rgd,
rgd->rg.rg_free--;
rewrite_rgrp = 1;
}
+ gfs1rg = (struct gfs_rgrp *)&rgd->rg;
+
/* If we're freeing a dinode, get rid of the data structs for it. */
if (old_state == GFS2_BLKST_DINODE ||
old_state == GFS2_BLKST_UNLINKED) {
--
2.5.5
next prev parent reply other threads:[~2016-06-22 19:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 19:26 [Cluster-devel] [gfs2-utils PATCH 0/7] fsck.gfs2 performance improvements Bob Peterson
2016-06-22 19:26 ` [Cluster-devel] [gfs2-utils PATCH 1/7] fsck.gfs2: Don't bother to pass bl blockmap pointer Bob Peterson
2016-06-23 12:45 ` Andrew Price
2016-06-22 19:26 ` [Cluster-devel] [gfs2-utils PATCH 2/7] fsck.gfs2: Remember the previous rgrp pointer for speed Bob Peterson
2016-06-22 19:26 ` Bob Peterson [this message]
2016-06-22 19:26 ` [Cluster-devel] [gfs2-utils PATCH 4/7] fsck.gfs2: Make _fsck_bitmap_set not send a return code Bob Peterson
2016-06-22 19:26 ` [Cluster-devel] [gfs2-utils PATCH 5/7] fsck.gfs2: convert fsck_bitmap_set to a macro Bob Peterson
2016-06-22 19:26 ` [Cluster-devel] [gfs2-utils PATCH 6/7] fsck.gfs2: Speed up function bitmap_type Bob Peterson
2016-06-22 19:26 ` [Cluster-devel] [gfs2-utils PATCH 7/7] fsck.gfs2: Make pass2 go by directory rbtree for performance Bob Peterson
2016-06-27 12:24 ` [Cluster-devel] [gfs2-utils PATCH 0/7] fsck.gfs2 performance improvements Steven Whitehouse
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=4f9e3a6f5bcf20a47f3eaf494d289da03a95b50c.1466623303.git.rpeterso@redhat.com \
--to=rpeterso@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).