From: rpeterso@sourceware.org <rpeterso@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs2 fsck/main.c fsck/metawalk.c fsck/ ...
Date: 17 Sep 2007 17:23:41 -0000 [thread overview]
Message-ID: <20070917172341.20651.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rpeterso at sourceware.org 2007-09-17 17:23:40
Modified files:
gfs2/fsck : main.c metawalk.c pass2.c
gfs2/libgfs2 : fs_ops.c libgfs2.h
Log message:
Resolves: bz 291451: gfs2_fsck -n, Bad file descriptor on line 63 of
file buf.c
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/main.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/metawalk.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.8&r2=1.3.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass2.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.3&r2=1.4.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/fs_ops.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.6&r2=1.4.2.7
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/libgfs2.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.11&r2=1.7.2.12
--- cluster/gfs2/fsck/main.c 2007/08/15 22:31:00 1.4.2.4
+++ cluster/gfs2/fsck/main.c 2007/09/17 17:23:40 1.4.2.5
@@ -283,6 +283,7 @@
struct gfs2_sbd sb;
struct gfs2_sbd *sbp = &sb;
int j;
+ enum update_flags update_sys_files;
memset(sbp, 0, sizeof(*sbp));
@@ -387,22 +388,24 @@
else
log_notice("Pass5 complete \n");
}
+ update_sys_files = (opts.no ? not_updated : updated);
/* Free up our system inodes */
- inode_put(sbp->md.inum, updated);
- inode_put(sbp->md.statfs, updated);
+ inode_put(sbp->md.inum, update_sys_files);
+ inode_put(sbp->md.statfs, update_sys_files);
for (j = 0; j < sbp->md.journals; j++)
- inode_put(sbp->md.journal[j], updated);
- inode_put(sbp->md.jiinode, updated);
- inode_put(sbp->md.riinode, updated);
- inode_put(sbp->md.qinode, updated);
- inode_put(sbp->md.pinode, updated);
- inode_put(sbp->md.rooti, updated);
- inode_put(sbp->master_dir, updated);
+ inode_put(sbp->md.journal[j], update_sys_files);
+ inode_put(sbp->md.jiinode, update_sys_files);
+ inode_put(sbp->md.riinode, update_sys_files);
+ inode_put(sbp->md.qinode, update_sys_files);
+ inode_put(sbp->md.pinode, update_sys_files);
+ inode_put(sbp->md.rooti, update_sys_files);
+ inode_put(sbp->master_dir, update_sys_files);
if (lf_dip)
- inode_put(lf_dip, updated);
+ inode_put(lf_dip, update_sys_files);
/* print_map(sbp->bl, sbp->last_fs_block); */
- log_notice("Writing changes to disk\n");
+ if (!opts.no)
+ log_notice("Writing changes to disk\n");
bsync(sbp);
destroy(sbp);
log_notice("gfs2_fsck complete \n");
--- cluster/gfs2/fsck/metawalk.c 2007/09/16 17:17:57 1.3.2.8
+++ cluster/gfs2/fsck/metawalk.c 2007/09/17 17:23:40 1.3.2.9
@@ -750,7 +750,7 @@
}
}
- inode_put(ip, update); /* does a brelse */
+ inode_put(ip, opts.no ? not_updated : update); /* does a brelse */
return error;
}
--- cluster/gfs2/fsck/pass2.c 2007/05/15 18:21:08 1.4.2.3
+++ cluster/gfs2/fsck/pass2.c 2007/09/17 17:23:40 1.4.2.4
@@ -608,7 +608,7 @@
}
}
- brelse(bh, update);
+ brelse(bh, opts.no ? not_updated : update);
return 0;
}
--- cluster/gfs2/libgfs2/fs_ops.c 2007/06/26 01:51:44 1.4.2.6
+++ cluster/gfs2/libgfs2/fs_ops.c 2007/09/17 17:23:40 1.4.2.7
@@ -335,7 +335,8 @@
}
void block_map(struct gfs2_inode *ip, uint64_t lblock, int *new,
- uint64_t *dblock, uint32_t *extlen, int prealloc)
+ uint64_t *dblock, uint32_t *extlen, int prealloc,
+ enum update_flags if_changed)
{
struct gfs2_sbd *sdp = ip->i_sbd;
struct gfs2_buffer_head *bh;
@@ -377,7 +378,7 @@
for (x = 0; x < end_of_metadata; x++) {
lookup_block(ip, bh, x, mp, create, new, dblock);
- brelse(bh, updated);
+ brelse(bh, if_changed);
if (!*dblock)
goto out;
@@ -417,7 +418,7 @@
}
}
- brelse(bh, updated);
+ brelse(bh, if_changed);
out:
free(mp);
@@ -478,7 +479,8 @@
amount = sdp->bsize - o;
if (!extlen)
- block_map(ip, lblock, ¬_new, &dblock, &extlen, FALSE);
+ block_map(ip, lblock, ¬_new, &dblock, &extlen,
+ FALSE, not_updated);
if (dblock) {
bh = bread(sdp, dblock);
@@ -550,7 +552,8 @@
if (!extlen) {
new = TRUE;
- block_map(ip, lblock, &new, &dblock, &extlen, FALSE);
+ block_map(ip, lblock, &new, &dblock, &extlen, FALSE,
+ updated);
}
if (new) {
@@ -591,7 +594,7 @@
if (inode_is_stuffed(ip))
unstuff_dinode(ip);
- block_map(ip, lbn, &new, &dbn, NULL, prealloc);
+ block_map(ip, lbn, &new, &dbn, NULL, prealloc, not_updated);
if (!dbn)
die("get_file_buf\n");
--- cluster/gfs2/libgfs2/libgfs2.h 2007/09/16 17:17:57 1.7.2.11
+++ cluster/gfs2/libgfs2/libgfs2.h 2007/09/17 17:23:40 1.7.2.12
@@ -406,7 +406,8 @@
int gfs2_dirent_del(struct gfs2_inode *dip, struct gfs2_buffer_head *bh,
const char *filename, int filename_len);
void block_map(struct gfs2_inode *ip, uint64_t lblock, int *new,
- uint64_t *dblock, uint32_t *extlen, int prealloc);
+ uint64_t *dblock, uint32_t *extlen, int prealloc,
+ enum update_flags if_changed);
void gfs2_get_leaf_nr(struct gfs2_inode *dip, uint32_t index,
uint64_t *leaf_out);
void gfs2_put_leaf_nr(struct gfs2_inode *dip, uint32_t inx, uint64_t leaf_out);
next reply other threads:[~2007-09-17 17:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-17 17:23 rpeterso [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-09-17 17:25 [Cluster-devel] cluster/gfs2 fsck/main.c fsck/metawalk.c fsck/ rpeterso
2007-09-17 17:08 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=20070917172341.20651.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.