From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [gfs2-utils PATCH 06/20] fsck.gfs2: Only preserve the _first_ acceptable inode reference
Date: Mon, 28 Sep 2015 09:45:51 -0500 [thread overview]
Message-ID: <82eeec249c04745e5c3cfecae935c7b131d0526b.1443450920.git.rpeterso@redhat.com> (raw)
In-Reply-To: <cover.1443450920.git.rpeterso@redhat.com>
Function resolve_dup_references starts out with a loop that traverses
the references for a given duplicate block. If it finds an acceptable
reference, it is supposed to preserve the first reference and resolve
the others. However, the logic allowed for multiple inodes to be
preserved, which can lead to fsck errors that need resolving with yet
another run of fsck.gfs2. This patch adds a check to see if we've
already preserved one, and if so, to not preserve others that might
happen to be acceptable.
rhbz#1257625
---
gfs2/fsck/pass1b.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gfs2/fsck/pass1b.c b/gfs2/fsck/pass1b.c
index 845227e..83a506c 100644
--- a/gfs2/fsck/pass1b.c
+++ b/gfs2/fsck/pass1b.c
@@ -114,8 +114,7 @@ static void resolve_dup_references(struct gfs2_sbd *sdp, struct duptree *dt,
if (acceptable_ref != ref_types && /* If we're nuking all but
an acceptable reference
type and */
- this_ref == acceptable_ref && /* this ref is acceptable */
- !found_good_ref) { /* We haven't found a good reference */
+ this_ref == acceptable_ref) { /* this ref is acceptable */
/* If this is an invalid inode, but not on the invalid
list, it's better to delete it. */
if (q == GFS2_BLKST_DINODE) {
--
2.4.3
next prev parent reply other threads:[~2015-09-28 14:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 14:45 [Cluster-devel] [gfs2-utils PATCH 00/20] fsck.gfs2: Fix bugs and eliminate pass1c Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 01/20] libgfs2: Check block range when inserting into rgrp tree Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 02/20] libgfs2: Check rgd->bits before referencing it Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 03/20] fsck.gfs2: Add check for gfs1 invalid inode refs in dentry Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 04/20] fsck.gfs2: Make debug messages more succinct wrt extended attributes Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 05/20] fsck.gfs2: Break up funtion handle_dup_blk Bob Peterson
2015-09-28 14:45 ` Bob Peterson [this message]
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 07/20] fsck.gfs2: Don't just assume the remaining EA reference is good Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 08/20] fsck.gfs2: Don't delete inode for duplicate reference in EA Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 09/20] fsck.gfs2: Don't traverse EAs that belong to another inode Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 10/20] fsck.gfs2: Refactor function check_indirect_eattr Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 11/20] fsck.gfs2: Once an indirect ea error is found, flag all that follow Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 12/20] fsck.gfs2: Always restore saved value for di_eattr Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 13/20] fsck.gfs2: Remove redundancy in add_duplicate_ref Bob Peterson
2015-09-28 14:45 ` [Cluster-devel] [gfs2-utils PATCH 14/20] fsck.gfs2: Don't remove duplicate eattr blocks Bob Peterson
2015-09-28 14:46 ` [Cluster-devel] [gfs2-utils PATCH 15/20] fsck.gfs2: Refactor check_eattr_entries and add error messages Bob Peterson
2015-09-28 14:46 ` [Cluster-devel] [gfs2-utils PATCH 16/20] fsck.gfs2: remove bad EAs at the end, not as-you-go Bob Peterson
2015-09-28 14:46 ` [Cluster-devel] [gfs2-utils PATCH 17/20] fsck.gfs2: Combine remove_inode_eattr with its only caller Bob Peterson
2015-09-28 14:46 ` [Cluster-devel] [gfs2-utils PATCH 18/20] fsck.gfs2: Print debug message to dilineate metadata blocks Bob Peterson
2015-09-28 14:46 ` [Cluster-devel] [gfs2-utils PATCH 19/20] fsck.gfs2: Remove pass1c in favor of processing in pass1 Bob Peterson
2015-09-28 14:46 ` [Cluster-devel] [gfs2-utils PATCH 20/20] fsck.gfs2: Clone duplicate data block pointers Bob Peterson
2015-09-29 18:02 ` [Cluster-devel] [gfs2-utils PATCH 00/20] fsck.gfs2: Fix bugs and eliminate pass1c Andrew Price
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=82eeec249c04745e5c3cfecae935c7b131d0526b.1443450920.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).