From: rpeterso@sourceware.org <rpeterso@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs2/fsck metawalk.c pass1.c pass1b.c ...
Date: 28 Jun 2007 23:42:45 -0000 [thread overview]
Message-ID: <20070628234245.6035.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rpeterso at sourceware.org 2007-06-28 23:42:45
Modified files:
gfs2/fsck : metawalk.c pass1.c pass1b.c pass1c.c pass5.c
Log message:
Revolves: bz 245803: GFS2: buffer count underflow for block
29581 (0x738d)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/metawalk.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.6&r2=1.3.2.7
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass1.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.4&r2=1.4.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass1b.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.1&r2=1.3.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass1c.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.1&r2=1.4.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass5.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.1&r2=1.3.2.2
--- cluster/gfs2/fsck/metawalk.c 2007/05/15 18:21:08 1.3.2.6
+++ cluster/gfs2/fsck/metawalk.c 2007/06/28 23:42:45 1.3.2.7
@@ -501,9 +501,9 @@
error = check_leaf_eattr(ip, block, indirect, pass);
ea_leaf_ptr++;
}
+ brelse(indirect_buf, not_updated);
}
- brelse(indirect_buf, not_updated);
return error;
}
--- cluster/gfs2/fsck/pass1.c 2007/05/15 18:21:08 1.4.2.4
+++ cluster/gfs2/fsck/pass1.c 2007/06/28 23:42:45 1.4.2.5
@@ -147,10 +147,6 @@
/* This inode contains an eattr - it may be invalid, but the
* eattr attributes points to a non-zero block */
- log_debug("Setting %" PRIu64 " (0x%" PRIx64 ") to eattr block\n",
- indirect, indirect);
- gfs2_block_set(bl, indirect, gfs2_eattr_block);
-
if(gfs2_check_range(sdp, indirect)) {
/*log_warn("EA indirect block #%"PRIu64" is out of range.\n",
indirect);
@@ -171,6 +167,10 @@
ret = 1;
}
else {
+ log_debug("Setting %" PRIu64 " (0x%"
+ PRIx64 ") to eattr block\n", indirect, indirect);
+ gfs2_block_set(bl, indirect, gfs2_eattr_block);
+
*bh = bread(sdp, indirect);
block = be64_to_cpu(*(*bh)->b_data);
if(gfs2_check_meta(*bh, GFS2_METATYPE_IN)) {
@@ -186,7 +186,6 @@
gfs2_block_set(bl, block, gfs2_indir_blk);
bc->ea_count++;
}
- brelse(*bh, not_updated);
}
return ret;
}
--- cluster/gfs2/fsck/pass1b.c 2007/01/23 19:30:19 1.3.2.1
+++ cluster/gfs2/fsck/pass1b.c 2007/06/28 23:42:45 1.3.2.2
@@ -214,6 +214,7 @@
struct dup_handler *dh = (struct dup_handler *) private;
/* Can't use fxns from eattr.c since we need to check the ref
* count */
+ *bh = NULL;
if(dh->ref_count == 1)
return 1;
if(block == dh->b->block_no) {
--- cluster/gfs2/fsck/pass1c.c 2007/01/23 19:30:19 1.4.2.1
+++ cluster/gfs2/fsck/pass1c.c 2007/06/28 23:42:45 1.4.2.2
@@ -47,7 +47,7 @@
int *update = (int *) private;
struct gfs2_sbd *sbp = ip->i_sbd;
struct gfs2_block_query q;
- struct gfs2_buffer_head *indir_bh;
+ struct gfs2_buffer_head *indir_bh = NULL;
if(gfs2_check_range(sbp, block)) {
log_err("Extended attributes indirect block out of range...removing\n");
--- cluster/gfs2/fsck/pass5.c 2007/01/23 19:30:19 1.3.2.1
+++ cluster/gfs2/fsck/pass5.c 2007/06/28 23:42:45 1.3.2.2
@@ -21,9 +21,13 @@
#include "fs_bits.h"
#include "util.h"
-int convert_mark(enum gfs2_mark_block mark, uint32_t *count)
+int convert_mark(struct gfs2_block_query *q, uint32_t *count)
{
- switch(mark) {
+ if (q->eattr_block) {
+ count[2]++;
+ return GFS2_BLKST_USED;
+ }
+ switch(q->block_type) {
case gfs2_meta_inval:
/* Convert invalid metadata to free blocks */
@@ -54,7 +58,7 @@
return GFS2_BLKST_USED;
default:
- log_err("Invalid state %d found\n", mark);
+ log_err("Invalid state %d found\n", q->block_type);
return -1;
}
return -1;
@@ -83,7 +87,7 @@
return 0;
gfs2_block_check(bl, block, &q);
- block_status = convert_mark(q.block_type, count);
+ block_status = convert_mark(&q, count);
if (rg_status != block_status) {
const char *blockstatus[] = {"Free", "Data", "Invalid", "inode"};
next reply other threads:[~2007-06-28 23:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-28 23:42 rpeterso [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-09-18 18:14 [Cluster-devel] cluster/gfs2/fsck metawalk.c pass1.c pass1b.c rpeterso
2007-06-28 23:41 rpeterso
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=20070628234245.6035.qmail@sourceware.org \
--to=rpeterso@sourceware.org \
/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).