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: STABLE2 - GFS2: Make gfs2_fsck accept UNLINKED metadata blocks Date: Thu, 28 Aug 2008 20:02:00 -0000 [thread overview] Message-ID: <20080828195842.EA2C5120379@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=75695e0c5cdd2511aef1b52a46dbf69ff95869dc Commit: 75695e0c5cdd2511aef1b52a46dbf69ff95869dc Parent: 78722d4068c7f2810a43615c69591e9e6fb9b9a4 Author: Bob Peterson <rpeterso@redhat.com> AuthorDate: Thu Aug 28 14:40:29 2008 -0500 Committer: Bob Peterson <rpeterso@redhat.com> CommitterDate: Thu Aug 28 14:55:20 2008 -0500 GFS2: Make gfs2_fsck accept UNLINKED metadata blocks bz 460327 Originally, GFS2 did not use a block type of 2 in the bitmaps, so it was considered invalid. However, GFS2 now uses that block type to indicate unlinked metadata blocks. This allows for cases where an inode is unlinked on one node while still open on another node. This fix changes gfs2_fsck so that it ignores these blocks (eventually the file system will reclaim them) rather than reporting them as errors. --- gfs2/fsck/pass5.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gfs2/fsck/pass5.c b/gfs2/fsck/pass5.c index 28d37e3..2a2cf4e 100644 --- a/gfs2/fsck/pass5.c +++ b/gfs2/fsck/pass5.c @@ -75,8 +75,18 @@ int check_block_status(struct gfs2_sbd *sbp, char *buffer, unsigned int buflen, block_status = convert_mark(&q, count); - if (rg_status != block_status) { - const char *blockstatus[] = {"Free", "Data", "Invalid", "inode"}; + /* If one node opens a file and another node deletes it, we + may be left with a block that appears to be "unlinked" in + the bitmap, but nothing links to it. This is a valid case + and should be cleaned up by the file system eventually. + So we ignore it. */ + if (rg_status == GFS2_BLKST_UNLINKED && + block_status == GFS2_BLKST_FREE) { + log_warn("Unlinked block found at block %" + PRIu64" (0x%" PRIx64 "), left unchanged.\n", + block, block); + } else if (rg_status != block_status) { + const char *blockstatus[] = {"Free", "Data", "Unlinked", "inode"}; log_err("Ondisk and fsck bitmaps differ at" " block %"PRIu64" (0x%" PRIx64 ") \n", block, block);
reply other threads:[~2008-08-28 19:59 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=20080828195842.EA2C5120379@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).