public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: RHEL5 - Fix block count in pass1b. Date: Mon, 06 Apr 2009 16:35:00 -0000 [thread overview] Message-ID: <20090406163502.B1CF5120263@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f74e81372ebf436590090e016e9d1a6e84969b86 Commit: f74e81372ebf436590090e016e9d1a6e84969b86 Parent: b16f07ed9033994e16610196046660960c0f4424 Author: Bob Peterson <rpeterso@redhat.com> AuthorDate: Sun Apr 5 20:22:30 2009 -0500 Committer: Bob Peterson <rpeterso@redhat.com> CommitterDate: Sun Apr 5 20:22:30 2009 -0500 Fix block count in pass1b. bz 493727 - GFS: gfs_fsck can delete everything in a corrupt file system When duplicate blocks are discovered by gfs_fsck, the block count was not being saved by the duplicate processing code. That caused the fsck to think there were zero blocks in the directory. The descrepency caused the whole root directory to be deleted. --- gfs/gfs_fsck/pass1b.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/gfs/gfs_fsck/pass1b.c b/gfs/gfs_fsck/pass1b.c index 5cb7d66..1f53e56 100644 --- a/gfs/gfs_fsck/pass1b.c +++ b/gfs/gfs_fsck/pass1b.c @@ -138,6 +138,8 @@ static int find_dentry(struct fsck_inode *ip, struct gfs_dirent *de, osi_list_t *tmp1, *tmp2; struct blocks *b; struct inode_with_dups *id; + struct gfs_leaf leaf; + osi_list_foreach(tmp1, &ip->i_sbd->dup_list) { b = osi_list_entry(tmp1, struct blocks, list); osi_list_foreach(tmp2, &b->ref_inode_list) { @@ -162,6 +164,10 @@ static int find_dentry(struct fsck_inode *ip, struct gfs_dirent *de, } } } + /* Return the number of leaf entries so metawalk doesn't flag this + leaf as having none. */ + gfs_leaf_in(&leaf, bh->b_data); + *count = leaf.lf_entries; return 0; }
reply other threads:[~2009-04-06 16:35 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090406163502.B1CF5120263@lists.fedorahosted.org \ --to=rpeterso@fedoraproject.org \ --cc=cluster-cvs-relay@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: linkBe 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 read-only IMAP folder(s) and NNTP newsgroup(s).